summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My/SysInfo.pm
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2008-10-11 17:30:26 +0200
committerMagnus Svensson <msvensson@mysql.com>2008-10-11 17:30:26 +0200
commit770ef5c307af84a04df1b778daaf7d5b14266e34 (patch)
tree928514ce37ecba3c7c11fe7673b83242f36a3d35 /mysql-test/lib/My/SysInfo.pm
parent6a107188489444a498f61ca6a897296eeb5262a0 (diff)
downloadmariadb-git-770ef5c307af84a04df1b778daaf7d5b14266e34.tar.gz
WL#4189 Set parallel to 1 if running under vmware on windows
Diffstat (limited to 'mysql-test/lib/My/SysInfo.pm')
-rw-r--r--mysql-test/lib/My/SysInfo.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm
index 8cb399c73ba..f1ba5fb610f 100644
--- a/mysql-test/lib/My/SysInfo.pm
+++ b/mysql-test/lib/My/SysInfo.pm
@@ -126,6 +126,15 @@ sub new {
\&_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){
if ($method->($self)){
return $self;
@@ -174,6 +183,12 @@ sub min_bogomips {
return $bogomips;
}
+sub isvm {
+ my ($self)= @_;
+
+ return $self->{isvm};
+}
+
# Prit the cpuinfo
sub print_info {