mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
Merge pull request #72899 from JohnAZoidberg/fix-py-test-driver-crash
nixos/tests: Ignore shutdown/crash if not booted
This commit is contained in:
commit
0923ffb2f6
@ -611,14 +611,14 @@ class Machine:
|
|||||||
self.log("QEMU running (pid {})".format(self.pid))
|
self.log("QEMU running (pid {})".format(self.pid))
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self.booted:
|
if not self.booted:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.shell.send("poweroff\n".encode())
|
self.shell.send("poweroff\n".encode())
|
||||||
self.wait_for_shutdown()
|
self.wait_for_shutdown()
|
||||||
|
|
||||||
def crash(self):
|
def crash(self):
|
||||||
if self.booted:
|
if not self.booted:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.log("forced crash")
|
self.log("forced crash")
|
||||||
|
Loading…
Reference in New Issue
Block a user