Test driver: exit when all VMs have exited rather than sleeping forever
This commit is contained in:
parent
1da7cea223
commit
82019c01bb
|
@ -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
|
# In interactive tests, this allows the non-interactive test script to
|
||||||
# be executed conveniently.
|
# be executed conveniently.
|
||||||
sub testScript {
|
sub testScript {
|
||||||
|
|
|
@ -157,7 +157,7 @@ rec {
|
||||||
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
||||||
wrapProgram $out/bin/nixos-run-vms \
|
wrapProgram $out/bin/nixos-run-vms \
|
||||||
--add-flags "$vms" \
|
--add-flags "$vms" \
|
||||||
--set tests '"startAll; sleep 1e9;"' \
|
--set tests '"startAll; joinAll;"' \
|
||||||
--set VLANS '"${toString vlans}"'
|
--set VLANS '"${toString vlans}"'
|
||||||
''; # "
|
''; # "
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue