2010-09-21 23:17:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2011-08-21 23:01:57 +00:00
|
|
|
#cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | nice timeout -k 1 40 parallel -j0 -k -L1
|
2011-07-20 23:58:23 +00:00
|
|
|
echo '### Test of --retries - it should run 13 jobs in total';
|
2016-07-22 16:10:28 +00:00
|
|
|
seq 0 12 | stdout parallel --retries 1 -S 12/localhost,1/:,parallel@parallel-server1 -uq \
|
|
|
|
perl -e 'print "job{}\n";exit({})' | wc -l
|
2010-09-21 23:17:05 +00:00
|
|
|
|
2011-07-20 23:58:23 +00:00
|
|
|
echo '### Test of --retries - it should run 25 jobs in total';
|
2016-07-22 16:10:28 +00:00
|
|
|
seq 0 12 | stdout parallel --retries 2 -S 12/localhost,1/:,parallel@parallel-server1 -uq \
|
|
|
|
perl -e 'print "job{}\n";exit({})' | wc -l
|
|
|
|
|
2010-11-29 22:59:16 +00:00
|
|
|
|
2011-07-20 23:58:23 +00:00
|
|
|
echo '### Test of --retries - it should run 49 jobs in total';
|
2016-07-22 16:10:28 +00:00
|
|
|
seq 0 12 | stdout parallel --retries 4 -S 12/localhost,1/:,parallel@parallel-server1 -uq \
|
|
|
|
perl -e 'print "job{}\n";exit({})' | wc -l
|
|
|
|
|
2011-08-21 23:01:57 +00:00
|
|
|
#EOF
|
2010-12-19 00:38:36 +00:00
|
|
|
echo '### Bug with --retries'
|
|
|
|
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+0 "hostname; false" | wc -l
|
|
|
|
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j+1 "hostname; false" | wc -l
|
|
|
|
seq 1 2 | parallel --retries 2 --sshlogin 8/localhost,8/: -j-1 "hostname; false" | wc -l
|
|
|
|
seq 1 1 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
|
|
|
seq 1 1 | parallel --retries 2 --sshlogin 1/localhost,1/: -j9 "hostname; false" | wc -l
|
|
|
|
seq 1 1 | parallel --retries 2 --sshlogin 1/localhost,1/: -j0 "hostname; false" | wc -l
|
2014-08-22 21:30:39 +00:00
|
|
|
# Fails due to 0 jobslots
|
|
|
|
# seq 1 1 | parallel --retries 2 --sshlogin 1/localhost,1/: -j-1 "hostname; false" | wc -l
|
2010-09-21 23:17:05 +00:00
|
|
|
|
2010-12-19 00:38:36 +00:00
|
|
|
echo '### These were not affected by the bug'
|
|
|
|
seq 1 8 | parallel --retries 2 --sshlogin 1/localhost,9/: -j-1 "hostname; false" | wc -l
|
|
|
|
seq 1 8 | parallel --retries 2 --sshlogin 8/localhost,8/: -j-1 "hostname; false" | wc -l
|
|
|
|
seq 1 1 | parallel --retries 2 --sshlogin 1/localhost,1/: "hostname; false" | wc -l
|
|
|
|
seq 1 4 | parallel --retries 2 --sshlogin 2/localhost,2/: -j-1 "hostname; false" | wc -l
|
|
|
|
seq 1 4 | parallel --retries 2 --sshlogin 2/localhost,2/: -j1 "hostname; false" | wc -l
|
|
|
|
seq 1 4 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
|
|
|
seq 1 2 | parallel --retries 2 --sshlogin 1/localhost,1/: -j1 "hostname; false" | wc -l
|
|
|
|
|