diff --git a/nixos/doc/manual/development/development.xml b/nixos/doc/manual/development/development.xml index 747159c44270..2983c76c770b 100644 --- a/nixos/doc/manual/development/development.xml +++ b/nixos/doc/manual/development/development.xml @@ -15,6 +15,7 @@ NixOS. + diff --git a/nixos/doc/manual/development/nixos-tests.xml b/nixos/doc/manual/development/nixos-tests.xml index a98da9933309..c09c41ea3bdc 100644 --- a/nixos/doc/manual/development/nixos-tests.xml +++ b/nixos/doc/manual/development/nixos-tests.xml @@ -15,5 +15,6 @@ required for the test. + - \ No newline at end of file + diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml new file mode 100644 index 000000000000..e47490777815 --- /dev/null +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -0,0 +1,43 @@ +
+Running Tests interactively + +The test itself can be run interactively. This is +particularly useful when developing or debugging a test: + + +$ nix-build nixos/tests/login.nix -A driver +$ ./result/bin/nixos-test-driver +starting VDE switch for network 1 +> + + +You can then take any Perl statement, e.g. + + +> startAll +> testScript +> $machine->succeed("touch /tmp/foo") + + +The function testScript executes the entire test +script and drops you back into the test driver command line upon its +completion. This allows you to inspect the state of the VMs after the +test (e.g. to debug the test script). + +To just start and experiment with the VMs, run: + + +$ 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. + +
diff --git a/nixos/doc/manual/development/running-nixos-tests.xml b/nixos/doc/manual/development/running-nixos-tests.xml index 156dcd205a55..908c0a66a32d 100644 --- a/nixos/doc/manual/development/running-nixos-tests.xml +++ b/nixos/doc/manual/development/running-nixos-tests.xml @@ -2,7 +2,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0" - xml:id="sec-running-nixos-tests"> + xml:id="sec-running-nixos-tests-interactively"> Running Tests @@ -38,42 +38,4 @@ $ firefox result/log.html - -Running Tests interactively - -The test itself can be run interactively. This is -particularly useful when developing or debugging a test: - - -$ nix-build nixos/tests/login.nix -A driver -$ ./result/bin/nixos-test-driver -starting VDE switch for network 1 -> - - -You can then take any Perl statement, e.g. - - -> startAll -> testScript -> $machine->succeed("touch /tmp/foo") - - -The function testScript executes the entire test -script and drops you back into the test driver command line upon its -completion. This allows you to inspect the state of the VMs after the -test (e.g. to debug the test script). - -To just start and experiment with the VMs, run: - - -$ 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. -