Merge pull request #46777 from erikarvstedt/docs

Improve docs
This commit is contained in:
Graham Christensen
2018-09-17 09:31:30 -04:00
committed by GitHub
3 changed files with 9 additions and 5 deletions
@@ -19,6 +19,7 @@ starting VDE switch for network 1
> startAll > startAll
> testScript > testScript
> $machine->succeed("touch /tmp/foo") > $machine->succeed("touch /tmp/foo")
> print($machine->succeed("pwd"), "\n") # Show stdout of command
</screen> </screen>
The function <command>testScript</command> executes the entire test script The function <command>testScript</command> executes the entire test script
and drops you back into the test driver command line upon its completion. and drops you back into the test driver command line upon its completion.
@@ -33,8 +34,11 @@ $ nix-build nixos/tests/login.nix -A driver
$ ./result/bin/nixos-run-vms $ ./result/bin/nixos-run-vms
</screen> </screen>
The script <command>nixos-run-vms</command> starts the virtual machines 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 defined by test.
kept across VM restarts in </para>
<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.
<para>
The machine state is kept across VM restarts in
<filename>/tmp/vm-state-</filename><varname>machinename</varname>.
</para> </para>
</section> </section>
@@ -108,7 +108,7 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis
<programlisting> <programlisting>
$machine->start; $machine->start;
$machine->waitForUnit("default.target"); $machine->waitForUnit("default.target");
$machine->succeed("uname") =~ /Linux/; die unless $machine->succeed("uname") =~ /Linux/;
</programlisting> </programlisting>
The first line is actually unnecessary; machines are implicitly started when The first line is actually unnecessary; machines are implicitly started when
you first execute an action on them (such as <literal>waitForUnit</literal> you first execute an action on them (such as <literal>waitForUnit</literal>
@@ -266,7 +266,7 @@ in
session. Each session script can set the session. Each session script can set the
<varname>waitPID</varname> shell variable to make this script <varname>waitPID</varname> shell variable to make this script
wait until the end of the user session. Each script is used wait until the end of the user session. Each script is used
to define either a windows manager or a desktop manager. These to define either a window manager or a desktop manager. These
can be differentiated by setting the attribute can be differentiated by setting the attribute
<varname>manage</varname> either to <literal>"window"</literal> <varname>manage</varname> either to <literal>"window"</literal>
or <literal>"desktop"</literal>. or <literal>"desktop"</literal>.