parallel/testsuite/tests-to-run/test13.sh

24 lines
735 B
Bash
Raw Permalink Normal View History

#!/bin/bash
echo '### Test -k'
ulimit -n 50
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {}"; echo "echo end") \
| stdout parallel -k -j0
echo '### Test --keep-order'
(seq 0 2) | parallel --keep-order -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
echo '### Test --keeporder'
(seq 0 2) | parallel --keeporder -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
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$$
echo '### Test bug: empty line for | sh with -k'
(echo echo a ; echo ; echo echo b) | parallel -k