diff options
author | Patrick Hilhorst <git@hilhorst.be> | 2022-01-02 23:48:56 +0100 |
---|---|---|
committer | Patrick Hilhorst <git@hilhorst.be> | 2022-01-04 14:52:37 +0100 |
commit | d4dc638d77fc31aaa3000090e50a69fa6096fb86 (patch) | |
tree | ea3fd2268d66c77660ab7229e7b4579fe96aeee2 /nixos/doc/manual/development/running-nixos-tests-interactively.section.md | |
parent | c003ae2dea252c20c58b1eb59b7b54e6170647d7 (diff) | |
download | nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar.gz nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar.bz2 nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar.lz nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar.xz nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.tar.zst nixpkgs-d4dc638d77fc31aaa3000090e50a69fa6096fb86.zip |
nixos/test-driver: also passthru driverInteractive
Diffstat (limited to 'nixos/doc/manual/development/running-nixos-tests-interactively.section.md')
-rw-r--r-- | nixos/doc/manual/development/running-nixos-tests-interactively.section.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md index f8729820179..4c399586eb5 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md @@ -4,19 +4,19 @@ The test itself can be run interactively. This is particularly useful when developing or debugging a test: ```ShellSession -$ nix-build nixos/tests/login.nix -A driverInteractive +$ nix-build . -A nixosTests.login.driverInteractive $ ./result/bin/nixos-test-driver --interactive -starting VDE switch for network 1 -> +[...] +>>> ``` You can then take any Python statement, e.g. ```py -> start_all() -> test_script() -> machine.succeed("touch /tmp/foo") -> print(machine.succeed("pwd")) # Show stdout of command +>>> start_all() +>>> test_script() +>>> machine.succeed("touch /tmp/foo") +>>> print(machine.succeed("pwd")) # Show stdout of command ``` The function `test_script` executes the entire test script and drops you |