Skip to content

Commit

Permalink
test-driver.py: defaulting keepVmState in Machine init
Browse files Browse the repository at this point in the history
ecb73fd 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
NixOS#97346 (comment) for
bug report.

Defaulting keepVmState to false when __main__ ends up not being
evaluated.
  • Loading branch information
picnoir committed Sep 11, 2020
1 parent a4754ca commit e571b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/lib/test-driver/test-driver.py
Expand Up @@ -228,7 +228,7 @@ def create_dir(name: str) -> str:
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")
Expand Down

0 comments on commit e571b31

Please sign in to comment.