Nix development
Open a Python shell in a test virtual machine
-
Start the interactive test driver:
nix run .#checks.x86_64-linux.<machine-name>-test.driverInteractiveTo exit the test driver, use the
CTRL-dkey combination. -
Start all machines:
start_all() -
Open a Linux shell:
machine.shell_interact()
How to inspect the generated Nix test script
Because the Python test script is dynamically generated via Nix string
interpolation, you cannot read it directly in the host's test.nix.
To dry-run evaluate and inspect the exact compiled Python script that will be executed for a given host, run:
nix eval --raw .#checks.x86_64-linux.<hostname>-test.testScript
This will print the complete generated Python source directly to your terminal.