@@ -2,7 +2,7 @@
22 xmlns:xlink="http://www.w3.org/1999/xlink"
33 xmlns:xi="http://www.w3.org/2001/XInclude"
44 version="5.0"
5− xml:id="sec-running-nixos-tests">
5+ xml:id="sec-running-nixos-tests-interactively">
66
77<title>Running Tests</title>
88
@@ -38,42 +38,4 @@ $ firefox result/log.html
3838</screen>
3939
4040</para>
41−
42−<title>Running Tests interactively</title>
43−
44−<para>The test itself can be run interactively. This is
45−particularly useful when developing or debugging a test:
46−
47−<screen>
48−$ nix-build nixos/tests/login.nix -A driver
49−$ ./result/bin/nixos-test-driver
50−starting VDE switch for network 1
51−>
52−</screen>
53−
54−You can then take any Perl statement, e.g.
55−
56−<screen>
57−> startAll
58−> testScript
59−> $machine->succeed("touch /tmp/foo")
60−</screen>
61−
62−The function <command>testScript</command> executes the entire test
63−script and drops you back into the test driver command line upon its
64−completion. This allows you to inspect the state of the VMs after the
65−test (e.g. to debug the test script).</para>
66−
67−<para>To just start and experiment with the VMs, run:
68−
69−<screen>
70−$ nix-build nixos/tests/login.nix -A driver
71−$ ./result/bin/nixos-run-vms
72−</screen>
73−
74−The script <command>nixos-run-vms</command> starts the virtual
75−machines defined by test. The root file system of the VMs is created
76−on the fly and kept across VM restarts in
77−<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para>
78−
7941</section>