diff options
Diffstat (limited to 'nixos/doc/manual/development/running-nixos-tests-interactively.xml')
-rw-r--r-- | nixos/doc/manual/development/running-nixos-tests-interactively.xml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml index c15ad448317fd..e390d62fde2f8 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.xml +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -9,17 +9,17 @@ The test itself can be run interactively. This is particularly useful when developing or debugging a test: <screen> -$ nix-build nixos/tests/login.nix -A driver -$ ./result/bin/nixos-test-driver +<prompt>$ </prompt>nix-build nixos/tests/login.nix -A driver +<prompt>$ </prompt>./result/bin/nixos-test-driver starting VDE switch for network 1 -> +<prompt>></prompt> </screen> You can then take any Perl statement, e.g. <screen> -> startAll -> testScript -> $machine->succeed("touch /tmp/foo") -> print($machine->succeed("pwd")) # Show stdout of command +<prompt>></prompt> startAll +<prompt>></prompt> testScript +<prompt>></prompt> $machine->succeed("touch /tmp/foo") +<prompt>></prompt> print($machine->succeed("pwd")) # 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. @@ -30,8 +30,8 @@ starting VDE switch for network 1 <para> To just start and experiment with the VMs, run: <screen> -$ nix-build nixos/tests/login.nix -A driver -$ ./result/bin/nixos-run-vms +<prompt>$ </prompt>nix-build nixos/tests/login.nix -A driver +<prompt>$ </prompt>./result/bin/nixos-run-vms </screen> The script <command>nixos-run-vms</command> starts the virtual machines defined by test. |