2009-06-07 21:29:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-10-04 21:46:12 +00:00
|
|
|
echo 'bug #46120: Suspend should suspend (at least local) children'
|
|
|
|
stdout bash -i -c 'stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 burnP6 ::: 1 | grep -q CPUTIME=1 &
|
|
|
|
sleep 1.1;
|
|
|
|
kill -TSTP -$!;
|
2015-10-12 00:15:06 +00:00
|
|
|
sleep 5;
|
|
|
|
fg;
|
|
|
|
echo Zero=OK $?' | grep -v '\[1\]'
|
|
|
|
|
|
|
|
stdout bash -i -c 'echo 1 | stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 burnP6 | grep -q CPUTIME=1 &
|
|
|
|
sleep 1.1;
|
|
|
|
kill -TSTP -$!;
|
2015-10-04 21:46:12 +00:00
|
|
|
sleep 5;
|
|
|
|
fg;
|
|
|
|
echo Zero=OK $?' | grep -v '\[1\]'
|
|
|
|
|
2015-09-28 21:27:45 +00:00
|
|
|
cat <<'EOF' | sed -e 's/;$/; /;' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
2013-02-02 21:20:36 +00:00
|
|
|
echo '### -L -n with pipe'
|
|
|
|
seq 14 | parallel --pipe -k -L 3 -n 2 'cat;echo 6 Ln line record'
|
|
|
|
|
|
|
|
echo '### -L -N with pipe'
|
|
|
|
seq 14 | parallel --pipe -k -L 3 -N 2 'cat;echo 6 LN line record'
|
|
|
|
|
|
|
|
echo '### -l -N with pipe'
|
|
|
|
seq 14 | parallel --pipe -k -l 3 -N 2 'cat;echo 6 lN line record'
|
|
|
|
|
|
|
|
echo '### -l -n with pipe'
|
|
|
|
seq 14 | parallel --pipe -k -l 3 -n 2 'cat;echo 6 ln line record'
|
|
|
|
|
2013-07-04 15:20:50 +00:00
|
|
|
echo '### bug #39360: --joblog does not work with --pipe'
|
2013-07-04 15:31:36 +00:00
|
|
|
seq 100 | parallel --joblog - --pipe wc | tr '0-9' 'X'
|
2013-02-02 21:20:36 +00:00
|
|
|
|
2013-07-30 19:21:08 +00:00
|
|
|
echo '### bug #39572: --tty and --joblog do not work'
|
|
|
|
seq 1 | parallel --joblog - -u true | tr '0-9' 'X'
|
|
|
|
|
2013-07-12 19:19:53 +00:00
|
|
|
echo '### How do we deal with missing $HOME'
|
2013-11-22 17:24:09 +00:00
|
|
|
unset HOME; stdout perl -w $(which parallel) -k echo ::: 1 2 3
|
2013-07-12 19:19:53 +00:00
|
|
|
|
|
|
|
echo '### How do we deal with missing $SHELL'
|
2013-11-22 17:24:09 +00:00
|
|
|
unset SHELL; stdout perl -w $(which parallel) -k echo ::: 1 2 3
|
2014-07-14 16:25:45 +00:00
|
|
|
|
|
|
|
echo '### Test if length is computed correctly - first should give one line, second 2 lines each'
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 4 | parallel -s 29 -X -kj1 echo a{}b{}c
|
2014-07-14 16:25:45 +00:00
|
|
|
seq 4 | parallel -s 28 -X -kj1 echo a{}b{}c
|
|
|
|
seq 4 | parallel -s 21 -X -kj1 echo {} {}
|
|
|
|
seq 4 | parallel -s 20 -X -kj1 echo {} {}
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 4 | parallel -s 23 -m -kj1 echo a{}b{}c
|
|
|
|
seq 4 | parallel -s 22 -m -kj1 echo a{}b{}c
|
2014-07-14 16:25:45 +00:00
|
|
|
seq 4 | parallel -s 21 -m -kj1 echo {} {}
|
|
|
|
seq 4 | parallel -s 20 -m -kj1 echo {} {}
|
|
|
|
|
2015-02-01 13:38:26 +00:00
|
|
|
echo 'bug #44144: --tagstring {=s/a/b/=} broken'
|
|
|
|
# Do not be confused by {} in --rpl
|
|
|
|
parallel --rpl '{:} s/A/D/;{}' --tagstring '{1:}{-1:}{= s/A/E/=}' echo {} ::: A/B.C
|
|
|
|
# Non-standard --parens
|
|
|
|
parallel --parens ,, --rpl '{:} s/A/D/;{}' --tagstring '{1:}{-1:}, 's/A/E/, echo {} ::: A/B.C
|
|
|
|
# Non-standard --parens -i
|
|
|
|
parallel --rpl '{:} s/A/D/;{}' --tag --parens ,, -iDUMMY echo {} ::: A/B.C
|
|
|
|
|
2015-08-10 22:25:37 +00:00
|
|
|
echo 'bug #45692: Easy way of cancelling a job in {= =} and'
|
|
|
|
echo 'bug #45691: Accessing multiple arguments in {= =}'
|
2015-08-16 00:53:47 +00:00
|
|
|
parallel -k echo {= '$arg[1] eq 2 and $job->skip()' =} ::: {1..5}
|
2015-08-10 22:25:37 +00:00
|
|
|
|
|
|
|
|
2011-07-20 23:58:23 +00:00
|
|
|
EOF
|