Unverified Commit 9b1025c7 authored by Maximilian Bosch's avatar Maximilian Bosch
Browse files

nixos/test-driver: always respect --dump-vsock

Before, the vsocks the test-run will use were only printed in
interactive mode. However, with `enableDebugHook = true;` this
functionality can also be used via `breakpointHook` within the build
sandbox, i.e. in the non-interactive mode.

I misremembered how much effort this is to fix, otherwise, I would've
added this to #422066 already ;)
parent febe951b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -148,11 +148,11 @@ def main() -> None:
        args.global_timeout,
        debug=debugger,
    ) as driver:
        if offset := args.dump_vsocks:
            driver.dump_machine_ssh(offset)
        if args.interactive:
            history_dir = os.getcwd()
            history_path = os.path.join(history_dir, ".nixos-test-history")
            if offset := args.dump_vsocks:
                driver.dump_machine_ssh(offset)
            ptpython.ipython.embed(
                user_ns=driver.test_symbols(),
                history_filename=history_path,