2009-11-10 14:14:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-03-22 20:16:35 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2018-09-20 22:15:14 +00:00
|
|
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 -r
|
2014-02-17 21:25:42 +00:00
|
|
|
echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations"
|
|
|
|
seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat;
|
|
|
|
echo echo 1-4 + 1-4
|
|
|
|
seq 4 | parallel -k -j3 --compress -N1 -L1 -vv echo;
|
|
|
|
echo 4 times wc to stderr to stdout
|
|
|
|
(seq 4 | parallel -k -j3 --compress -N1 -L1 --pipe wc '>&2') 2>&1 >/dev/null
|
|
|
|
echo 1 2 3 4
|
|
|
|
seq 4 | parallel -k -j3 --compress echo;
|
|
|
|
echo 1 2 3 4
|
|
|
|
seq 4 | parallel -k -j1 --compress echo;
|
|
|
|
echo 1 2
|
|
|
|
seq 2 | parallel -k -j1 --compress echo;
|
|
|
|
echo 1 2 3
|
|
|
|
seq 3 | parallel -k -j2 --compress -N1 -L1 --pipe cat;
|
|
|
|
|
2014-02-16 20:53:15 +00:00
|
|
|
echo "### bug #41609: --compress fails"
|
2014-02-16 17:57:57 +00:00
|
|
|
seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum
|
|
|
|
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
|
|
|
|
|
2014-02-21 03:07:56 +00:00
|
|
|
echo "### --compress race condition (use nice): Fewer than 400 would run"
|
2015-07-22 06:28:05 +00:00
|
|
|
# 2>/dev/null to ignore Warning: Starting 45 processes took > 2 sec.
|
|
|
|
seq 400| nice parallel -j200 --compress echo 2>/dev/null | wc
|
2014-02-21 03:07:56 +00:00
|
|
|
|
|
|
|
echo "### -v --pipe: Dont spawn too many - 1 is enough"
|
|
|
|
seq 1 | parallel -j10 -v --pipe cat
|
|
|
|
|
2014-02-22 10:05:59 +00:00
|
|
|
echo "### Test -N0 and --tagstring (fails)"
|
|
|
|
echo tagstring arg | parallel --tag -N0 echo foo
|
|
|
|
|
2012-08-08 21:57:01 +00:00
|
|
|
echo "### Test -I";
|
|
|
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::'
|
|
|
|
|
|
|
|
echo "### Test -X -I";
|
|
|
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -X -k -I :: echo a{} b::'
|
|
|
|
|
|
|
|
echo "### Test -m -I";
|
|
|
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
|
|
|
|
|
|
|
|
2015-02-01 15:57:31 +00:00
|
|
|
echo "### bug #36659: --sshlogin strips leading slash from ssh command"
|
2012-08-08 21:57:01 +00:00
|
|
|
parallel --sshlogin '/usr/bin/ssh localhost' echo ::: OK
|
|
|
|
|
2015-02-01 15:57:31 +00:00
|
|
|
echo "### bug #36660: --workdir mkdir does not use --sshlogin custom ssh"
|
2014-06-23 00:04:37 +00:00
|
|
|
rm -rf /tmp/foo36660;
|
2015-02-01 13:38:26 +00:00
|
|
|
cd /tmp; echo OK > parallel_test36660.txt;
|
2012-06-14 20:19:49 +00:00
|
|
|
ssh () { echo Failed; };
|
|
|
|
export -f ssh;
|
2015-02-01 13:38:26 +00:00
|
|
|
parallel --workdir /tmp/foo36660/bar --transfer --sshlogin '/usr/bin/ssh localhost' cat ::: parallel_test36660.txt;
|
|
|
|
rm -rf /tmp/foo36660 parallel_test36660.txt
|
2012-06-14 20:19:49 +00:00
|
|
|
|
2015-02-01 15:57:31 +00:00
|
|
|
echo "bug #36657: --load does not work with custom ssh"
|
2012-06-14 20:30:24 +00:00
|
|
|
ssh () { echo Failed; };
|
|
|
|
export -f ssh;
|
|
|
|
parallel --load=1000% -S "/usr/bin/ssh localhost" echo ::: OK
|
|
|
|
|
2012-12-28 10:46:35 +00:00
|
|
|
|
2012-06-14 20:10:39 +00:00
|
|
|
EOF
|