2009-09-04 05:23:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2010-05-27 06:09:28 +00:00
|
|
|
echo '### Test -k'
|
2014-10-25 10:44:10 +00:00
|
|
|
ulimit -n 50
|
2010-07-14 10:00:10 +00:00
|
|
|
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {}"; echo "echo end") \
|
2010-10-26 23:50:58 +00:00
|
|
|
| stdout parallel -k -j0
|
2009-10-26 11:22:21 +00:00
|
|
|
|
2010-09-21 20:00:30 +00:00
|
|
|
echo '### Test --keep-order'
|
2010-11-26 00:45:04 +00:00
|
|
|
(seq 0 2) | parallel --keep-order -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
2010-09-21 20:00:30 +00:00
|
|
|
|
|
|
|
echo '### Test --keeporder'
|
2010-11-26 00:45:04 +00:00
|
|
|
(seq 0 2) | parallel --keeporder -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
2010-09-21 20:00:30 +00:00
|
|
|
|
2010-05-27 06:09:28 +00:00
|
|
|
echo '### Test SIGTERM'
|
2015-02-01 13:38:26 +00:00
|
|
|
parallel -k -j20 sleep 3';' echo ::: {1..99} >/tmp/parallel$$ 2>&1 &
|
2013-04-11 19:55:33 +00:00
|
|
|
A=$!
|
|
|
|
sleep 5; kill -TERM $A
|
|
|
|
wait
|
2015-02-01 13:38:26 +00:00
|
|
|
sort /tmp/parallel$$
|
|
|
|
rm /tmp/parallel$$
|
2011-06-03 12:53:14 +00:00
|
|
|
|
|
|
|
echo '### Test bug: empty line for | sh with -k'
|
|
|
|
(echo echo a ; echo ; echo echo b) | parallel -k
|