Merge pull request #72899 from JohnAZoidberg/fix-py-test-driver-crash

nixos/tests: Ignore shutdown/crash if not booted
This commit is contained in:
worldofpeace
2019-11-06 17:28:26 +00:00
committed by GitHub

View File

@@ -611,14 +611,14 @@ class Machine:
self.log("QEMU running (pid {})".format(self.pid))
def shutdown(self):
if self.booted:
if not self.booted:
return
self.shell.send("poweroff\n".encode())
self.wait_for_shutdown()
def crash(self):
if self.booted:
if not self.booted:
return
self.log("forced crash")