forked from mirrors/nixpkgs
nixos/tests: Ignore shutdown/crash if not booted
Condition seems to be inverted. Crash and shutdown only make sense, when the machine is booted; i.e. we return immediately otherwise. In the Perl test driver this is: return unless $self->{booted};
This commit is contained in:
parent
a1a448424c
commit
afbfef93a7
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue