3
0
Fork 0
forked from mirrors/nixpkgs

test-driver: Set context to include machines created by createMachine

This commit is contained in:
Eelco Dolstra 2014-05-21 14:05:43 +02:00
parent d4ccfe3f6b
commit 48601269a9

View file

@ -52,12 +52,12 @@ sub createMachine {
my ($args) = @_;
my $vm = Machine->new({%{$args}, log => $log, redirectSerial => ($ENV{USE_SERIAL} // "0") ne "1"});
$vms{$vm->name} = $vm;
$context .= "my \$" . $vm->name . " = \$vms{'" . $vm->name . "'}; ";
return $vm;
}
foreach my $vmScript (@ARGV) {
my $vm = createMachine({startCommand => $vmScript});
$context .= "my \$" . $vm->name . " = \$vms{'" . $vm->name . "'}; ";
}