From d65fa2a35dfc80ecdd8b0b2a7d3d1b47a7aef0e5 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 4 Mar 2015 00:12:00 +0100 Subject: [PATCH] Fixed --number-of-cores for hpux-ia64. --- src/parallel | 7 ++++--- testsuite/tests-to-run/parallel-polarhome.sh | 6 ++++-- testsuite/wanted-results/parallel-local22 | 10 +++++----- testsuite/wanted-results/parallel-polarhome | 9 +++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/parallel b/src/parallel index 9ce96f5e..d69e0461 100755 --- a/src/parallel +++ b/src/parallel @@ -1035,7 +1035,7 @@ sub parse_options { sub init_globals { # Defaults: - $Global::version = 20150225; + $Global::version = 20150302; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; @@ -3315,6 +3315,7 @@ sub which { 'openbsd' => $bsd, 'solaris' => $sysv, 'svr5' => $sysv, + 'syllable' => "echo ps not supported", ); } $pid_parentpid_cmd{$^O} or ::die_bug("pid_parentpid_cmd for $^O missing"); @@ -4932,7 +4933,7 @@ sub no_of_cpus_hpux { # Number of physical CPUs on HP-UX # undef if not HP-UX my $no_of_cpus = - (`/usr/bin/mpsched -s 2>&1 | grep 'Locality Domain Count' | awk '{ print \$4 }'`); + qx{/usr/bin/mpsched -s 2>&1 | grep 'Locality Domain Count' | awk '{ print \$4 }'}; return $no_of_cpus; } @@ -4941,7 +4942,7 @@ sub no_of_cores_hpux { # Number of CPU cores on HP-UX # undef if not HP-UX my $no_of_cores = - (`/usr/bin/mpsched -s 2>&1 | grep 'Processor Count' | awk '{ print \$3 }'`); + qx{/usr/bin/mpsched -s 2>&1 | perl -ne '/Processor Count\\D+(\\d+)/ and print "\$1\n"'}; return $no_of_cores; } diff --git a/testsuite/tests-to-run/parallel-polarhome.sh b/testsuite/tests-to-run/parallel-polarhome.sh index b8bcda6c..28a160e4 100644 --- a/testsuite/tests-to-run/parallel-polarhome.sh +++ b/testsuite/tests-to-run/parallel-polarhome.sh @@ -1,10 +1,12 @@ #!/bin/bash -P_ALL="vax freebsd solaris openbsd netbsd debian alpha aix redhat hpux ultrix minix qnx irix tru64 openindiana suse solaris-x86 mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi" +# Check servers up on http://www.polarhome.com/service/status/ + +P_ALL="vax freebsd solaris openbsd netbsd debian alpha aix redhat hpux ultrix minix qnx irix tru64 openindiana suse solaris-x86 mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi macosx hpux-ia64 syllable" P_NOTWORKING="vax alpha openstep" P_NOTWORKING_YET="ultrix irix" -P_WORKING="minix freebsd solaris openbsd netbsd debian aix redhat hpux qnx tru64 openindiana suse solaris-x86 mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi" +P_WORKING="minix freebsd solaris openbsd netbsd debian aix redhat hpux qnx tru64 openindiana suse solaris-x86 mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi macosx hpux-ia64 syllable" P="$P_WORKING" POLAR=`parallel -k echo {}.polarhome.com ::: $P` diff --git a/testsuite/wanted-results/parallel-local22 b/testsuite/wanted-results/parallel-local22 index af1f761c..7afe71ff 100644 --- a/testsuite/wanted-results/parallel-local22 +++ b/testsuite/wanted-results/parallel-local22 @@ -73,11 +73,11 @@ parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines echo '### bug #42893: --block should not cause decimals in cat_partial' ### bug #42893: --block should not cause decimals in cat_partial seq 100000 >/tmp/parallel-decimal; parallel --dry-run -kvv --pipepart --block 0.12345M -a /tmp/parallel-decimal true; rm /tmp/parallel-decimal - 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 0 129449|(true) - 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 129449 129450|(true) - 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 258899 129450|(true) - 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 388349 129450|(true) - 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 517799 71096|(true) + 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 0 129449 | (true) + 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 129449 129450 | (true) + 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 258899 129450 | (true) + 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 388349 129450 | (true) + 32768 ? 32768 : $left))){ $left -= $read; syswrite(STDOUT,$buf); } }' 0 0 517799 71096 | (true) echo '### bug #42902: profiles containing arguments with space' ### bug #42902: profiles containing arguments with space echo "--rpl 'FULLPATH chomp(\$_=\"/bin/bash=\".\`readlink -f \$_\`);' " > ~/.parallel/FULLPATH; parallel -JFULLPATH echo FULLPATH ::: $0 diff --git a/testsuite/wanted-results/parallel-polarhome b/testsuite/wanted-results/parallel-polarhome index c1110d8d..459d6592 100644 --- a/testsuite/wanted-results/parallel-polarhome +++ b/testsuite/wanted-results/parallel-polarhome @@ -70,3 +70,12 @@ hurd.polarhome.com Works on hurd.polarhome.com copy_and_test raspberrypi.polarhome.com raspberrypi.polarhome.com ### Run the test on raspberrypi.polarhome.com raspberrypi.polarhome.com Works on raspberrypi.polarhome.com +copy_and_test macosx.polarhome.com +macosx.polarhome.com ### Run the test on macosx.polarhome.com +macosx.polarhome.com Works on macosx.polarhome.com +copy_and_test hpux-ia64.polarhome.com +hpux-ia64.polarhome.com ### Run the test on hpux-ia64.polarhome.com +hpux-ia64.polarhome.com Works on hpux-ia64.polarhome.com +copy_and_test syllable.polarhome.com +syllable.polarhome.com ### Run the test on syllable.polarhome.com +syllable.polarhome.com chmod: changing permissions of `bin/p.tmp': Function not implemented