manual: re-add running nixos tests sections

+47 -40
+1
nixos/doc/manual/development/development.xml
··· 15 15 <xi:include href="writing-modules.xml" /> 16 16 <xi:include href="building-parts.xml" /> 17 17 <xi:include href="building-nixos.xml" /> 18 + <xi:include href="nixos-tests.xml" /> 18 19 <xi:include href="testing-installer.xml" /> 19 20 20 21 </part>
+2 -1
nixos/doc/manual/development/nixos-tests.xml
··· 15 15 16 16 <xi:include href="writing-nixos-tests.xml" /> 17 17 <xi:include href="running-nixos-tests.xml" /> 18 + <xi:include href="running-nixos-tests-interactively.xml" /> 18 19 19 - </chapter> 20 + </chapter>
+43
nixos/doc/manual/development/running-nixos-tests-interactively.xml
··· 1 + <section xmlns="http://docbook.org/ns/docbook" 2 + xmlns:xlink="http://www.w3.org/1999/xlink" 3 + xmlns:xi="http://www.w3.org/2001/XInclude" 4 + version="5.0" 5 + xml:id="sec-running-nixos-tests"> 6 + <title>Running Tests interactively</title> 7 + 8 + <para>The test itself can be run interactively. This is 9 + particularly useful when developing or debugging a test: 10 + 11 + <screen> 12 + $ nix-build nixos/tests/login.nix -A driver 13 + $ ./result/bin/nixos-test-driver 14 + starting VDE switch for network 1 15 + &gt; 16 + </screen> 17 + 18 + You can then take any Perl statement, e.g. 19 + 20 + <screen> 21 + &gt; startAll 22 + &gt; testScript 23 + &gt; $machine->succeed("touch /tmp/foo") 24 + </screen> 25 + 26 + The function <command>testScript</command> executes the entire test 27 + script and drops you back into the test driver command line upon its 28 + completion. This allows you to inspect the state of the VMs after the 29 + test (e.g. to debug the test script).</para> 30 + 31 + <para>To just start and experiment with the VMs, run: 32 + 33 + <screen> 34 + $ nix-build nixos/tests/login.nix -A driver 35 + $ ./result/bin/nixos-run-vms 36 + </screen> 37 + 38 + The script <command>nixos-run-vms</command> starts the virtual 39 + machines defined by test. The root file system of the VMs is created 40 + on the fly and kept across VM restarts in 41 + <filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para> 42 + 43 + </section>
+1 -39
nixos/doc/manual/development/running-nixos-tests.xml
··· 2 2 xmlns:xlink="http://www.w3.org/1999/xlink" 3 3 xmlns:xi="http://www.w3.org/2001/XInclude" 4 4 version="5.0" 5 - xml:id="sec-running-nixos-tests"> 5 + xml:id="sec-running-nixos-tests-interactively"> 6 6 7 7 <title>Running Tests</title> 8 8 ··· 38 38 </screen> 39 39 40 40 </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 - &gt; 52 - </screen> 53 - 54 - You can then take any Perl statement, e.g. 55 - 56 - <screen> 57 - &gt; startAll 58 - &gt; testScript 59 - &gt; $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 - 79 41 </section>