mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 07:27:55 +00:00
42a5f4e0cc
max_jobs_running could be resat if -j is a changed file. dummy children was not killed if cmd line was too long. default number of jobs for --semaphore set to 1. test25 had race condition. test22 -j10 added. test13 -j9 added. test47 remote cleanup added before test. test17 remote cleanup added before test.
35 lines
1.1 KiB
Bash
Executable file
35 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
PAR=parallel
|
|
SERVER1=parallel-server1
|
|
SERVER2=parallel-server2
|
|
|
|
(
|
|
echo '### Test exit val'
|
|
echo true | parallel
|
|
echo $?
|
|
echo false | parallel
|
|
echo $?
|
|
|
|
echo '### Test --halt-on-error'
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 0
|
|
echo $?
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 1
|
|
echo $?
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 2
|
|
echo $?
|
|
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 -H0
|
|
echo $?
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 -H1
|
|
echo $?
|
|
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 -H2
|
|
echo $?
|
|
|
|
echo '### Test last dying print --halt-on-error'
|
|
(seq 0 8;echo 0; echo 9) | parallel -j10 -kqH1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'
|
|
echo $?
|
|
(seq 0 8;echo 0; echo 9) | parallel -j10 -kqH2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'
|
|
echo $?
|
|
) 2>&1
|