test-driver.py: defaulting keepVmState in Machine init
ecb73fd5557d6d438aa7c155e5b1aad89373c6ae introduced a new keepVmState CLI flag for test-driver.py. This CLI flags gets forwarded to the Machine class through create_machine. It created a regression for the boot tests where __main__ end up not being evaluated. See https://github.com/NixOS/nixpkgs/pull/97346#issuecomment-690951837 for bug report. Defaulting keepVmState to false when __main__ ends up not being evaluated.
This commit is contained in:
parent
a4754caab7
commit
e571b315e2
@ -228,7 +228,7 @@ class Machine:
|
||||
return path
|
||||
|
||||
self.state_dir = os.path.join(tmp_dir, f"vm-state-{self.name}")
|
||||
if not args["keepVmState"]:
|
||||
if not args.get("keepVmState", False):
|
||||
self.cleanup_statedir()
|
||||
os.makedirs(self.state_dir, mode=0o700, exist_ok=True)
|
||||
self.shared_dir = create_dir("shared-xchg")
|
||||
|
Loading…
x
Reference in New Issue
Block a user