Test driver: exit when all VMs have exited rather than sleeping forever

This commit is contained in:
Eelco Dolstra 2012-06-22 14:31:07 -04:00
parent 1da7cea223
commit 82019c01bb
2 changed files with 9 additions and 1 deletions

View File

@ -68,6 +68,14 @@ sub startAll {
}
# Wait until all VMs have terminated.
sub joinAll {
$log->nest("waiting for all VMs to finish", sub {
$_->waitForShutdown foreach values %vms;
});
}
# In interactive tests, this allows the non-interactive test script to
# be executed conveniently.
sub testScript {

View File

@ -157,7 +157,7 @@ rec {
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
wrapProgram $out/bin/nixos-run-vms \
--add-flags "$vms" \
--set tests '"startAll; sleep 1e9;"' \
--set tests '"startAll; joinAll;"' \
--set VLANS '"${toString vlans}"'
''; # "