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 ($args) = @_;
my $vm = Machine->new({%{$args}, log => $log, redirectSerial => ($ENV{USE_SERIAL} // "0") ne "1"}); my $vm = Machine->new({%{$args}, log => $log, redirectSerial => ($ENV{USE_SERIAL} // "0") ne "1"});
$vms{$vm->name} = $vm; $vms{$vm->name} = $vm;
$context .= "my \$" . $vm->name . " = \$vms{'" . $vm->name . "'}; ";
return $vm; return $vm;
} }
foreach my $vmScript (@ARGV) { foreach my $vmScript (@ARGV) {
my $vm = createMachine({startCommand => $vmScript}); my $vm = createMachine({startCommand => $vmScript});
$context .= "my \$" . $vm->name . " = \$vms{'" . $vm->name . "'}; ";
} }