From 61663da4fd51a0a5d514ce670884b3ed0ef81608 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 29 Jun 2017 20:19:39 -0400 Subject: [PATCH] Run script fixes for AIX github: closes #46 --- UnixBench/Run | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/UnixBench/Run b/UnixBench/Run index a16a5c9..5955bae 100755 --- a/UnixBench/Run +++ b/UnixBench/Run @@ -775,7 +775,9 @@ sub getSystemInfo { $info->{'os'} = getCmdOutput("uname -o") || getCmdOutput("uname -s"); $info->{'osRel'} = getCmdOutput("uname -r"); $info->{'osVer'} = getCmdOutput("uname -v"); - $info->{'mach'} = getCmdOutput("uname -m"); + $info->{'mach'} = $^O ne "aix" + ? getCmdOutput("uname -m") + : getCmdOutput("uname -p"); $info->{'platform'} = getCmdOutput("uname -i") || "unknown"; # Get the system name (SUSE, Red Hat, etc.) if possible. @@ -788,9 +790,13 @@ sub getSystemInfo { # Get the language info. my $lang = getCmdOutput("printenv LANG"); - my $map = getCmdOutput("locale -k LC_CTYPE | grep charmap") || ""; + my $map = $^O ne "aix" + ? getCmdOutput("locale -k LC_CTYPE | grep charmap") || "" + : getCmdOutput("locale charmap") || ""; $map =~ s/.*=//; - my $coll = getCmdOutput("locale -k LC_COLLATE | grep collate-codeset") || ""; + my $coll = $^O ne "aix" + ? getCmdOutput("locale -k LC_COLLATE | grep collate-codeset") || "" + : getCmdOutput("locale | grep LC_COLLATE") || ""; $coll =~ s/.*=//; $info->{'language'} = sprintf "%s (charmap=%s, collate=%s)", $lang, $map, $coll; @@ -844,11 +850,12 @@ sub preChecks { $ENV{'LANG'} = $language; # Check that the required files are in the proper places. - system("make check"); + my $make = $ENV{MAKE} || "make"; + system("$make check"); if ($? != 0) { - system("make all"); + system("$make all"); if ($? != 0) { - abortRun("\"make all\" failed"); + abortRun("\"$make all\" failed"); } }