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
commit 0923ffb2f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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")