3
0
Fork 0
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:
Daniel Schaefer 2019-11-06 16:06:43 +01:00
parent a1a448424c
commit afbfef93a7

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