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 ;)
This commit is contained in:
parent
febe951bcd
commit
9b1025c7fd
@ -148,11 +148,11 @@ def main() -> None:
|
|||||||
args.global_timeout,
|
args.global_timeout,
|
||||||
debug=debugger,
|
debug=debugger,
|
||||||
) as driver:
|
) as driver:
|
||||||
|
if offset := args.dump_vsocks:
|
||||||
|
driver.dump_machine_ssh(offset)
|
||||||
if args.interactive:
|
if args.interactive:
|
||||||
history_dir = os.getcwd()
|
history_dir = os.getcwd()
|
||||||
history_path = os.path.join(history_dir, ".nixos-test-history")
|
history_path = os.path.join(history_dir, ".nixos-test-history")
|
||||||
if offset := args.dump_vsocks:
|
|
||||||
driver.dump_machine_ssh(offset)
|
|
||||||
ptpython.ipython.embed(
|
ptpython.ipython.embed(
|
||||||
user_ns=driver.test_symbols(),
|
user_ns=driver.test_symbols(),
|
||||||
history_filename=history_path,
|
history_filename=history_path,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user