mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-27 07:07:56 +00:00
155 lines
3.4 KiB
Plaintext
155 lines
3.4 KiB
Plaintext
echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations"
|
|
### 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
|
|
1
|
|
echo 1-4 + 1-4
|
|
seq 4 | parallel -k -j3 --compress -N1 -L1 -vv echo; echo 4 times wc to stderr to stdout
|
|
echo 1
|
|
1
|
|
echo 2
|
|
2
|
|
echo 3
|
|
3
|
|
echo 4
|
|
4
|
|
4 times wc to stderr to stdout
|
|
(seq 4 | parallel -k -j3 --compress -N1 -L1 --pipe wc '>&2') 2>&1 >/dev/null
|
|
1 1 2
|
|
1 1 2
|
|
1 1 2
|
|
1 1 2
|
|
echo 1 2 3 4
|
|
1 2 3 4
|
|
seq 4 | parallel -k -j3 --compress echo; echo 1 2 3 4
|
|
1
|
|
2
|
|
3
|
|
4
|
|
1 2 3 4
|
|
seq 4 | parallel -k -j1 --compress echo; echo 1 2
|
|
1
|
|
2
|
|
3
|
|
4
|
|
1 2
|
|
seq 2 | parallel -k -j1 --compress echo; echo 1 2 3
|
|
1
|
|
2
|
|
1 2 3
|
|
seq 3 | parallel -k -j2 --compress -N1 -L1 --pipe cat; echo "### bug #41609: --compress fails"
|
|
1
|
|
2
|
|
3
|
|
### bug #41609: --compress fails
|
|
seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum
|
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
|
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
|
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
|
echo "### --compress race condition (use nice): Fewer than 400 would run"
|
|
### --compress race condition (use nice): Fewer than 400 would run
|
|
# 2>/dev/null to ignore Warning: Starting 45 processes took > 2 sec.
|
|
seq 400| nice parallel -j200 --compress echo 2>/dev/null | wc
|
|
400 400 1492
|
|
echo "### -v --pipe: Dont spawn too many - 1 is enough"
|
|
### -v --pipe: Dont spawn too many - 1 is enough
|
|
seq 1 | parallel -j10 -v --pipe cat
|
|
cat
|
|
1
|
|
echo "### Test -N0 and --tagstring (fails)"
|
|
### Test -N0 and --tagstring (fails)
|
|
echo tagstring arg | parallel --tag -N0 echo foo
|
|
foo
|
|
echo "### Test -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::'
|
|
### Test -I
|
|
1 1
|
|
2 1
|
|
2 2
|
|
3 1
|
|
3 2
|
|
3 3
|
|
4 1
|
|
4 2
|
|
4 3
|
|
4 4
|
|
5 1
|
|
5 2
|
|
5 3
|
|
5 4
|
|
5 5
|
|
6 1
|
|
6 2
|
|
6 3
|
|
6 4
|
|
6 5
|
|
6 6
|
|
7 1
|
|
7 2
|
|
7 3
|
|
7 4
|
|
7 5
|
|
7 6
|
|
7 7
|
|
8 1
|
|
8 2
|
|
8 3
|
|
8 4
|
|
8 5
|
|
8 6
|
|
8 7
|
|
8 8
|
|
9 1
|
|
9 2
|
|
9 3
|
|
9 4
|
|
9 5
|
|
9 6
|
|
9 7
|
|
9 8
|
|
9 9
|
|
10 1
|
|
10 2
|
|
10 3
|
|
10 4
|
|
10 5
|
|
10 6
|
|
10 7
|
|
10 8
|
|
10 9
|
|
10 10
|
|
echo "### Test -X -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -X -k -I :: echo a{} b::'
|
|
### Test -X -I
|
|
a1 b1
|
|
a2 b1 b2
|
|
a3 b1 b2 b3
|
|
a4 b1 b2 b3 b4
|
|
a5 b1 b2 b3 b4 b5
|
|
a6 b1 b2 b3 b4 b5 b6
|
|
a7 b1 b2 b3 b4 b5 b6 b7
|
|
a8 b1 b2 b3 b4 b5 b6 b7 b8
|
|
a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
|
|
a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
|
|
echo "### Test -m -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
|
### Test -m -I
|
|
a1 b1
|
|
a2 b1 2
|
|
a3 b1 2 3
|
|
a4 b1 2 3 4
|
|
a5 b1 2 3 4 5
|
|
a6 b1 2 3 4 5 6
|
|
a7 b1 2 3 4 5 6 7
|
|
a8 b1 2 3 4 5 6 7 8
|
|
a9 b1 2 3 4 5 6 7 8 9
|
|
a10 b1 2 3 4 5 6 7 8 9 10
|
|
echo "### bug #36659: --sshlogin strips leading slash from ssh command"
|
|
### bug #36659: --sshlogin strips leading slash from ssh command
|
|
parallel --sshlogin '/usr/bin/ssh localhost' echo ::: OK
|
|
OK
|
|
echo "### bug #36660: --workdir mkdir does not use --sshlogin custom ssh"
|
|
### bug #36660: --workdir mkdir does not use --sshlogin custom ssh
|
|
rm -rf /tmp/foo36660; cd /tmp; echo OK > parallel_test36660.txt; ssh () { echo Failed; }; export -f ssh; parallel --workdir /tmp/foo36660/bar --transfer --sshlogin '/usr/bin/ssh localhost' cat ::: parallel_test36660.txt; rm -rf /tmp/foo36660 parallel_test36660.txt
|
|
OK
|
|
echo "bug #36657: --load does not work with custom ssh"
|
|
bug #36657: --load does not work with custom ssh
|
|
ssh () { echo Failed; }; export -f ssh; parallel --load=1000% -S "/usr/bin/ssh localhost" echo ::: OK
|
|
OK
|