From b0956b0ae3e89549a13b9a47dc3cbc5eba5f10af Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 17 Sep 2018 12:58:12 +0200 Subject: [PATCH 1/4] nixos tests doc: fix example statement False statements don't cause NixOS tests to fail, we need to throw an exception or terminate. --- nixos/doc/manual/development/writing-nixos-tests.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 5935fbc049bd..983f8f9cbe3e 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -108,7 +108,7 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis $machine->start; $machine->waitForUnit("default.target"); -$machine->succeed("uname") =~ /Linux/; +die unless $machine->succeed("uname") =~ /Linux/; The first line is actually unnecessary; machines are implicitly started when you first execute an action on them (such as waitForUnit From 6e203af3998171548c5febb0cd52a061bae82cf8 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 17 Sep 2018 12:58:13 +0200 Subject: [PATCH 2/4] nixos tests doc: add example statement --- .../doc/manual/development/running-nixos-tests-interactively.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml index 862b364a6d79..4680433bc997 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.xml +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -19,6 +19,7 @@ starting VDE switch for network 1 > startAll > testScript > $machine->succeed("touch /tmp/foo") +> print($machine->succeed("pwd"), "\n") # Show stdout of command The function testScript executes the entire test script and drops you back into the test driver command line upon its completion. From a91330a41b5440796150b61903e767e648b8ec97 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 17 Sep 2018 12:58:14 +0200 Subject: [PATCH 3/4] nixos tests doc: update VM state path --- .../development/running-nixos-tests-interactively.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml index 4680433bc997..b25d3dcb9116 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.xml +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -34,8 +34,11 @@ $ nix-build nixos/tests/login.nix -A driver $ ./result/bin/nixos-run-vms The script nixos-run-vms starts the virtual machines - defined by test. The root file system of the VMs is created on the fly and - kept across VM restarts in - ./hostname.qcow2. + defined by test. + + + + The machine state is kept across VM restarts in + /tmp/vm-state-machinename. From 4c755e1218bb11aba5f49ff7f5a8a2c31fdf1b41 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 17 Sep 2018 12:58:15 +0200 Subject: [PATCH 4/4] nixos display-managers: fix typo in description --- nixos/modules/services/x11/display-managers/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index f561c5f8b7a9..357fa8ce8f36 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -266,7 +266,7 @@ in session. Each session script can set the waitPID shell variable to make this script wait until the end of the user session. Each script is used - to define either a windows manager or a desktop manager. These + to define either a window manager or a desktop manager. These can be differentiated by setting the attribute manage either to "window" or "desktop".