semiportable testsuite: cd testsuite; make portable

This commit is contained in:
Ole Tange 2011-03-09 18:47:00 +01:00
parent a5a4d67686
commit 7b8f379adc
5 changed files with 45 additions and 5 deletions

View file

@ -1515,6 +1515,20 @@ sub usage {
print "See 'man $Global::progname' for the options\n";
}
sub die_bug {
my $bugid = shift;
print STDERR
("$Global::progname: This should not happen. You have found a bug.\n",
"Please contact <parallel\@gnu.org> and include:\n",
"* The version number: $Global::version\n",
"* The bugid: $bugid\n",
"* The command line being run\n",
"* The files being read (put the files on a webserver if they are big)\n",
"\n",
"If you get the error on smaller/fewer files, please include those instead.\n");
::wait_and_exit(255);
}
sub version {
# Returns: N/A
print join("\n",
@ -3410,7 +3424,7 @@ sub replace_placeholders {
0 .. $#args);
}
} else {
die('This should not happen. Contact <parallel@gnu.org>.');
::die_bug('replace_placeholders20110309');
}
}

View file

@ -27,3 +27,7 @@ dist:
mv /tmp/parallel.tar.bz2 parallel-$$(date +"%Y%m%d").tar.bz2
rsync -Havessh parallel-$$(date +"%Y%m%d").tar.bz2 download.savannah.nongnu.org:/releases/parallel/
portable:
# Cache sudo password
sudo echo
time bash Portable.sh

14
testsuite/Portable.sh Normal file
View file

@ -0,0 +1,14 @@
#!/bin/bash
export LANG=C
SHFILE=/tmp/unittest-parallel.sh
# These tests seem to work on another machine
ls -t tests-to-run/test{01,03,04,05,06,07,08,09,11,15,22,24,25,26,28,29,31,33,34,39,40,43,49,52,53,54}.sh \
tests-to-run/niceload01.sh tests-to-run/sem01.sh \
| perl -pe 's:(.*/(.*)).sh:bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2:' \
>$SHFILE
mkdir -p actual-results
sh -x $SHFILE
rm $SHFILE

View file

@ -1,7 +1,4 @@
#!/bin/bash
echo '### Test too slow spawning'
(sleep 0.3; seq 1 10 | parallel -j50 burnP6) &
seq 1 500 | nice nice stdout timeout -k 1 10 \
parallel -j500 "killall -9 burnP6 2>/dev/null ; echo {} >/dev/null"
killall -9 burnP6
seq 1000000000 1000000010 | pv -L 10 -q | stdout parallel -j 10 echo

View file

@ -1,3 +1,14 @@
### Test too slow spawning
parallel: Warning: Starting 10 extra processes takes > 2 sec.
Consider adjusting -j. Press CTRL-C to stop.
1000000000
1000000001
1000000002
1000000003
1000000004
1000000005
1000000006
1000000007
1000000008
1000000009
1000000010