WL#4189 Set parallel to 1 if running under vmware on windows
This commit is contained in:
parent
6a10718848
commit
770ef5c307
@ -126,6 +126,15 @@ sub new {
|
|||||||
\&_unamex,
|
\&_unamex,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Detect virtual machines
|
||||||
|
my $isvm= 0;
|
||||||
|
|
||||||
|
if (IS_WINDOWS) {
|
||||||
|
# Detect vmware service
|
||||||
|
$isvm= `tasklist` =~ /vmwareservice/i;
|
||||||
|
}
|
||||||
|
$self->{isvm}= $isvm;
|
||||||
|
|
||||||
foreach my $method (@info_methods){
|
foreach my $method (@info_methods){
|
||||||
if ($method->($self)){
|
if ($method->($self)){
|
||||||
return $self;
|
return $self;
|
||||||
@ -174,6 +183,12 @@ sub min_bogomips {
|
|||||||
return $bogomips;
|
return $bogomips;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub isvm {
|
||||||
|
my ($self)= @_;
|
||||||
|
|
||||||
|
return $self->{isvm};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Prit the cpuinfo
|
# Prit the cpuinfo
|
||||||
sub print_info {
|
sub print_info {
|
||||||
|
@ -279,6 +279,7 @@ sub main {
|
|||||||
}
|
}
|
||||||
$opt_parallel= 8 if ($opt_parallel > 8);
|
$opt_parallel= 8 if ($opt_parallel > 8);
|
||||||
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);
|
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);
|
||||||
|
$opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm());
|
||||||
$opt_parallel= 1 if ($opt_parallel < 1);
|
$opt_parallel= 1 if ($opt_parallel < 1);
|
||||||
mtr_report("Using parallel: $opt_parallel");
|
mtr_report("Using parallel: $opt_parallel");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user