diff options
author | Domen Kožar <domen@dev.si> | 2014-11-27 19:01:34 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-11-27 20:01:18 +0100 |
commit | b4cedc79657e8f60727cf4b43027a5732d392ddc (patch) | |
tree | 313c55e160d8dcbe62aab86db32f624d379fd5bf /nixos/doc | |
parent | 2249474632c882628eedc52183ff7a3691120e23 (diff) |
nixos: reverse logic in nixos interactive tests documentation
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/development/running-nixos-tests.xml | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/nixos/doc/manual/development/running-nixos-tests.xml b/nixos/doc/manual/development/running-nixos-tests.xml index d9be761eb01d7..156dcd205a55b 100644 --- a/nixos/doc/manual/development/running-nixos-tests.xml +++ b/nixos/doc/manual/development/running-nixos-tests.xml @@ -39,24 +39,13 @@ $ firefox result/log.html </para> -<para>It is also possible to run the test environment interactively, -allowing you to experiment with the VMs. For example: +<title>Running Tests interactively</title> -<screen> -$ nix-build login.nix -A driver -$ ./result/bin/nixos-run-vms -</screen> - -The script <command>nixos-run-vms</command> 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 -<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para> - -<para>Finally, the test itself can be run interactively. This is +<para>The test itself can be run interactively. This is particularly useful when developing or debugging a test: <screen> -$ nix-build tests/ -A nfs.driver +$ nix-build nixos/tests/login.nix -A driver $ ./result/bin/nixos-test-driver starting VDE switch for network 1 > @@ -66,6 +55,7 @@ You can then take any Perl statement, e.g. <screen> > startAll +> testScript > $machine->succeed("touch /tmp/foo") </screen> @@ -74,4 +64,16 @@ 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).</para> -</section> \ No newline at end of file +<para>To just start and experiment with the VMs, run: + +<screen> +$ nix-build nixos/tests/login.nix -A driver +$ ./result/bin/nixos-run-vms +</screen> + +The script <command>nixos-run-vms</command> 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 +<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para> + +</section> |