nixos/tests/vbox: Make shutdown less noisy
Using waitUntilSucceeds for testing whether the shutdown signalling files have vanished is quite noisy because it prints two lines for every try. This is now fixed with a while loop on the guest VM which does the same check but with only one output for the command that's executed and another one when the conditions are met. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
e19aa3819e
commit
562c7f56f0
@ -273,9 +273,12 @@ let
|
||||
|
||||
sub shutdownVM_${name} {
|
||||
$machine->succeed(ru "touch ${sharePath}/shutdown");
|
||||
$machine->waitUntilSucceeds(
|
||||
"test ! -e ${sharePath}/shutdown ".
|
||||
" -a ! -e ${sharePath}/boot-done"
|
||||
$machine->execute(
|
||||
'set -e; i=0; '.
|
||||
'while test -e ${sharePath}/shutdown '.
|
||||
' -o -e ${sharePath}/boot-done; do '.
|
||||
'sleep 1; i=$(($i + 1)); [ $i -le 3600 ]; '.
|
||||
'done'
|
||||
);
|
||||
waitForShutdown_${name};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user