diff --git a/src/parallel b/src/parallel index 2386d893..f52ac200 100755 --- a/src/parallel +++ b/src/parallel @@ -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 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 .'); + ::die_bug('replace_placeholders20110309'); } } diff --git a/testsuite/Makefile b/testsuite/Makefile index fa84c888..6e628ead 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -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 diff --git a/testsuite/Portable.sh b/testsuite/Portable.sh new file mode 100644 index 00000000..c7e01841 --- /dev/null +++ b/testsuite/Portable.sh @@ -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 diff --git a/testsuite/tests-to-run/test34.sh b/testsuite/tests-to-run/test34.sh index 021994ea..11c083e3 100644 --- a/testsuite/tests-to-run/test34.sh +++ b/testsuite/tests-to-run/test34.sh @@ -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 diff --git a/testsuite/wanted-results/test34 b/testsuite/wanted-results/test34 index d598bdb2..eefde548 100644 --- a/testsuite/wanted-results/test34 +++ b/testsuite/wanted-results/test34 @@ -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