test-driver: add persistent history

across sessions of interactive testing
This commit is contained in:
Matthieu Coudron 2023-07-27 13:57:52 +02:00
parent 0fa6394cbb
commit 3a7597b8a6

View file

@ -106,7 +106,13 @@ def main() -> None:
args.keep_vm_state,
) as driver:
if args.interactive:
ptpython.repl.embed(driver.test_symbols(), {})
history_dir = os.getcwd()
history_path = os.path.join(history_dir, ".nixos-test-history")
ptpython.repl.embed(
driver.test_symbols(),
{},
history_filename=history_path,
)
else:
tic = time.time()
driver.run_tests()