nixos: reverse logic in nixos interactive tests documentation
This commit is contained in:
parent
2249474632
commit
b4cedc7965
@ -39,24 +39,13 @@ $ firefox result/log.html
|
|||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>It is also possible to run the test environment interactively,
|
<title>Running Tests interactively</title>
|
||||||
allowing you to experiment with the VMs. For example:
|
|
||||||
|
|
||||||
<screen>
|
<para>The test itself can be run interactively. This is
|
||||||
$ 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
|
|
||||||
particularly useful when developing or debugging a test:
|
particularly useful when developing or debugging a test:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-build tests/ -A nfs.driver
|
$ nix-build nixos/tests/login.nix -A driver
|
||||||
$ ./result/bin/nixos-test-driver
|
$ ./result/bin/nixos-test-driver
|
||||||
starting VDE switch for network 1
|
starting VDE switch for network 1
|
||||||
>
|
>
|
||||||
@ -66,6 +55,7 @@ You can then take any Perl statement, e.g.
|
|||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
> startAll
|
> startAll
|
||||||
|
> testScript
|
||||||
> $machine->succeed("touch /tmp/foo")
|
> $machine->succeed("touch /tmp/foo")
|
||||||
</screen>
|
</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
|
completion. This allows you to inspect the state of the VMs after the
|
||||||
test (e.g. to debug the test script).</para>
|
test (e.g. to debug the test script).</para>
|
||||||
|
|
||||||
</section>
|
<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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user