commit
c8cc8d496d
@ -19,6 +19,7 @@ starting VDE switch for network 1
|
||||
> startAll
|
||||
> testScript
|
||||
> $machine->succeed("touch /tmp/foo")
|
||||
> print($machine->succeed("pwd"), "\n") # Show stdout of command
|
||||
</screen>
|
||||
The function <command>testScript</command> executes the entire test script
|
||||
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
|
||||
</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>.
|
||||
defined by test.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The machine state is kept across VM restarts in
|
||||
<filename>/tmp/vm-state-</filename><varname>machinename</varname>.
|
||||
</para>
|
||||
</section>
|
||||
|
@ -108,7 +108,7 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis
|
||||
<programlisting>
|
||||
$machine->start;
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->succeed("uname") =~ /Linux/;
|
||||
die unless $machine->succeed("uname") =~ /Linux/;
|
||||
</programlisting>
|
||||
The first line is actually unnecessary; machines are implicitly started when
|
||||
you first execute an action on them (such as <literal>waitForUnit</literal>
|
||||
|
@ -266,7 +266,7 @@ in
|
||||
session. Each session script can set the
|
||||
<varname>waitPID</varname> shell variable to make this script
|
||||
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
|
||||
<varname>manage</varname> either to <literal>"window"</literal>
|
||||
or <literal>"desktop"</literal>.
|
||||
|
Loading…
Reference in New Issue
Block a user