2016-05-17 00:11:38 +00:00
|
|
|
echo '### Test --load remote'
|
|
|
|
### Test --load remote
|
2017-06-22 11:35:58 +00:00
|
|
|
ssh parallel@lo 'seq 10 | parallel --nice 19 --timeout 15 -j0 -qN0 perl -e while\(1\)\{\ \}' & sleep 1; stdout /usr/bin/time -f %e parallel -S parallel@lo --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
2016-05-17 00:11:38 +00:00
|
|
|
OK
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2018-03-21 21:57:28 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
2018-07-22 06:58:32 +00:00
|
|
|
parallel: Warning: perl -e 'while(1){ }' ''
|
2016-05-17 00:11:38 +00:00
|
|
|
echo '**'
|
|
|
|
**
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
2014-07-14 16:25:45 +00:00
|
|
|
### Stop if all hosts are filtered and there are no hosts left to run on
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
2015-05-15 06:47:44 +00:00
|
|
|
parallel: Warning: Removed no-such.host.
|
2018-11-25 18:06:06 +00:00
|
|
|
parallel: Error: Cannot run any jobs.
|
2015-12-20 17:20:30 +00:00
|
|
|
echo '### Can csh propagate a variable containing \n'; export A=$(seq 3); parallel -S csh@lo --env A bash -c \''echo "$A"'\' ::: dummy
|
2015-01-02 12:07:44 +00:00
|
|
|
### Can csh propagate a variable containing \n
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test bug #34241: --pipe should not spawn unneeded processes'
|
2013-01-21 22:10:34 +00:00
|
|
|
### Test bug #34241: --pipe should not spawn unneeded processes
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 5 | ssh csh@lo parallel -k --block 5 --pipe -j10 cat\\\;echo Block_end
|
2013-01-21 22:10:34 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
Block_end
|
|
|
|
3
|
|
|
|
4
|
2015-07-22 06:28:05 +00:00
|
|
|
Block_end
|
2013-01-21 22:10:34 +00:00
|
|
|
5
|
|
|
|
Block_end
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #40002: --files and --nonall seem not to work together:'
|
2013-09-28 13:59:03 +00:00
|
|
|
### bug #40002: --files and --nonall seem not to work together:
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --files --nonall -S localhost true | tee >(parallel rm) | wc -l
|
2013-09-28 13:59:03 +00:00
|
|
|
1
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #40001: --joblog and --nonall seem not to work together:'
|
2013-09-28 13:59:03 +00:00
|
|
|
### bug #40001: --joblog and --nonall seem not to work together:
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --joblog - --nonall -S lo,localhost true | wc -l
|
2013-09-28 13:59:03 +00:00
|
|
|
3
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #40132: FreeBSD: --workdir . gives warning if . == $HOME'
|
2013-09-28 15:55:04 +00:00
|
|
|
### bug #40132: FreeBSD: --workdir . gives warning if . == $HOME
|
2014-07-15 00:40:38 +00:00
|
|
|
cd && parallel --workdir . -S lo pwd ::: ""
|
2017-04-01 00:59:07 +00:00
|
|
|
~
|
2015-05-10 20:23:13 +00:00
|
|
|
echo '### use function as $PARALLEL_SSH'
|
|
|
|
### use function as $PARALLEL_SSH
|
|
|
|
foossh() { echo "FOOSSH" >&2; ssh "$@"; }; export -f foossh; PARALLEL_SSH=foossh parallel -S 1/lo echo ::: 'Run through FOOSSH?'
|
|
|
|
Run through FOOSSH?
|
|
|
|
FOOSSH
|
2015-05-10 20:52:47 +00:00
|
|
|
echo '### use --ssh'
|
|
|
|
### use --ssh
|
|
|
|
barssh() { echo "BARSSH" >&2; ssh "$@"; }; export -f barssh; parallel --ssh barssh -S 1/lo echo ::: 'Run through BARSSH?'
|
|
|
|
Run through BARSSH?
|
|
|
|
BARSSH
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### test filename :'
|
2013-10-21 20:31:52 +00:00
|
|
|
### test filename :
|
2014-07-15 00:40:38 +00:00
|
|
|
echo content-of-: > :; echo : | parallel -j1 --trc {}.{.} -S parallel@lo '(echo remote-{}.{.};cat {}) > {}.{.}'; cat :.:; rm : :.:
|
2013-10-21 20:31:52 +00:00
|
|
|
remote-:.:
|
|
|
|
content-of-:
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --wd ... --cleanup which should remove the filled tmp dir'
|
2013-10-21 20:31:52 +00:00
|
|
|
### Test --wd ... --cleanup which should remove the filled tmp dir
|
2015-12-20 17:20:30 +00:00
|
|
|
ssh sh@lo 'mkdir -p .parallel/tmp; find .parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm'; stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S sh@lo -v echo ">"{}.6 ::: uNiQuE_sTrInG; find ~sh/.parallel/tmp |grep uNiQuE_sTrInG.6
|
2013-10-21 20:31:52 +00:00
|
|
|
echo >uNiQuE_sTrInG.6
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --wd --'
|
2013-10-21 20:31:52 +00:00
|
|
|
### Test --wd --
|
2015-12-20 17:20:30 +00:00
|
|
|
stdout parallel --wd -- -S sh@lo echo OK ">"{}.7 ::: uNiQuE_sTrInG; cat ~sh/--/uNiQuE_sTrInG.7; stdout ssh sh@lo rm ./--/uNiQuE_sTrInG.7
|
2013-10-21 20:31:52 +00:00
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --wd " "'
|
2013-10-21 20:31:52 +00:00
|
|
|
### Test --wd " "
|
2015-12-20 17:20:30 +00:00
|
|
|
stdout parallel --wd " " -S sh@lo echo OK ">"{}.8 ::: uNiQuE_sTrInG; cat ~sh/" "/uNiQuE_sTrInG.8; stdout ssh sh@lo rm ./'" "'/uNiQuE_sTrInG.8
|
2013-10-21 20:31:52 +00:00
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "### Test --wd \"'\""
|
2013-10-21 20:31:52 +00:00
|
|
|
### Test --wd "'"
|
2015-12-20 17:20:30 +00:00
|
|
|
stdout parallel --wd "'" -S sh@lo echo OK ">"{}.9 ::: uNiQuE_sTrInG; cat ~sh/"'"/uNiQuE_sTrInG.9; stdout ssh sh@lo rm ./"\\'"/uNiQuE_sTrInG.9
|
2013-10-21 20:31:52 +00:00
|
|
|
OK
|
2014-07-21 15:07:48 +00:00
|
|
|
echo '### Test --trc ./--/--foo1'
|
|
|
|
### Test --trc ./--/--foo1
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
|
2013-10-21 20:31:52 +00:00
|
|
|
Content --/--foo1
|
|
|
|
remote1
|
|
|
|
Content --/--foo1
|
|
|
|
remote2
|
2014-07-21 15:07:48 +00:00
|
|
|
echo '### Test --trc ./:dir/:foo2'
|
|
|
|
### Test --trc ./:dir/:foo2
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
|
2013-10-21 20:31:52 +00:00
|
|
|
Content :dir/:foo2
|
|
|
|
remote1
|
|
|
|
Content :dir/:foo2
|
|
|
|
remote2
|
2014-07-21 15:07:48 +00:00
|
|
|
echo '### Test --trc ./" "/" "foo3'
|
|
|
|
### Test --trc ./" "/" "foo3
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
|
2013-10-21 20:31:52 +00:00
|
|
|
Content _/_foo3
|
|
|
|
remote1
|
|
|
|
Content _/_foo3
|
|
|
|
remote2
|
2014-07-21 15:07:48 +00:00
|
|
|
echo '### Test --trc ./--/./--foo4'
|
|
|
|
### Test --trc ./--/./--foo4
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; stdout parallel --trc {}.1 -S sh@lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
|
2014-07-21 15:07:48 +00:00
|
|
|
Content --/./--foo4
|
|
|
|
remote--/./--foo4
|
|
|
|
echo '### Test --trc ./:/./:foo5'
|
|
|
|
### Test --trc ./:/./:foo5
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./:a; echo 'Content :a/./:foo5' > ./:a/./:foo5; stdout parallel --trc {}.1 -S sh@lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:a/./:foo5; cat ./:a/./:foo5.1
|
|
|
|
Content :a/./:foo5
|
|
|
|
remote./:a/./:foo5
|
2014-07-21 15:07:48 +00:00
|
|
|
echo '### Test --trc ./" "/./" "foo6'
|
|
|
|
### Test --trc ./" "/./" "foo6
|
2015-12-20 17:20:30 +00:00
|
|
|
mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6; stdout parallel --trc {}.1 -S sh@lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
|
2014-07-21 15:07:48 +00:00
|
|
|
Content _/./_foo6
|
|
|
|
remote./ /./ foo6
|
2015-12-20 17:20:30 +00:00
|
|
|
echo '### Test --trc "-- " "-- "'
|
|
|
|
### Test --trc "-- " "-- "
|
|
|
|
touch -- '-- ' ' --'; rm -f ./?--.a ./--?.a; parallel --trc {}.a -S csh@lo,sh@lo touch ./{}.a ::: '-- ' ' --'; ls ./--?.a ./?--.a; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?-- || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./--? || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--.a || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./--?.a || echo OK'
|
|
|
|
./ --.a
|
|
|
|
./-- .a
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
ls: No match.
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access './?--': No such file or directory
|
2015-12-20 17:20:30 +00:00
|
|
|
ls: No match.
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access './--?': No such file or directory
|
2015-12-20 17:20:30 +00:00
|
|
|
ls: No match.
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access './?--.a': No such file or directory
|
2015-12-20 17:20:30 +00:00
|
|
|
ls: No match.
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access './--?.a': No such file or directory
|
2016-03-20 22:57:25 +00:00
|
|
|
echo '### Test --trc "/tmp/./--- /A" "/tmp/./ ---/B"'
|
|
|
|
### Test --trc "/tmp/./--- /A" "/tmp/./ ---/B"
|
2018-10-22 22:46:38 +00:00
|
|
|
mkdir -p '/tmp/./--- ' '/tmp/ ---'; touch -- '/tmp/./--- /A' '/tmp/ ---/B'; rm -f ./---?/A.a ./?---/B.a; parallel --trc {=s:.*/./::=}.a -S csh@lo,sh@lo touch ./{=s:.*/./::=}.a ::: '/tmp/./--- /A' '/tmp/./ ---/B'; ls ./---?/A.a ./?---/B.a | LC_ALL=C sort; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--- ./---? || echo OK' | LC_ALL=C sort; echo '### bug #46519: --onall ignores --transfer'
|
2016-03-20 22:57:25 +00:00
|
|
|
./ ---/B.a
|
|
|
|
./--- /A.a
|
|
|
|
OK
|
|
|
|
OK
|
2015-12-20 17:20:30 +00:00
|
|
|
### bug #46519: --onall ignores --transfer
|
2016-03-20 22:57:25 +00:00
|
|
|
ls: No match.
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access './?---': No such file or directory
|
|
|
|
ls: cannot access './---?': No such file or directory
|
2015-12-20 17:20:30 +00:00
|
|
|
touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???; parallel --onall --tf bug46519.{} --trc bug46519.{}{} --trc bug46519.{}{}{} -S csh@lo,sh@lo 'ls bug46519.{}; touch bug46519.{}{} bug46519.{}{}{}' ::: a b c; ls bug46519.?? bug46519.???; parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
|
|
|
|
bug46519.a
|
|
|
|
bug46519.b
|
|
|
|
bug46519.c
|
|
|
|
bug46519.a
|
|
|
|
bug46519.b
|
|
|
|
bug46519.c
|
|
|
|
bug46519.aa
|
|
|
|
bug46519.aaa
|
|
|
|
bug46519.bb
|
|
|
|
bug46519.bbb
|
|
|
|
bug46519.cc
|
|
|
|
bug46519.ccc
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access 'bug46519.aa': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.aaa': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.bb': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.bbb': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.cc': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.ccc': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.aa': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.aaa': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.bb': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.bbb': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.cc': No such file or directory
|
|
|
|
ls: cannot access 'bug46519.ccc': No such file or directory
|
2016-05-17 00:11:38 +00:00
|
|
|
echo '### Test --nice remote'
|
|
|
|
### Test --nice remote
|
2018-07-22 06:58:32 +00:00
|
|
|
stdout parallel --nice 1 -S lo -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b | perl -pe 's/\S*parallel-server\S*/one-server/;s:="[0-9]+":="XXXXX":i;'
|
|
|
|
ssh lo -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$bashfunc = "";@ARGV="PAR=a bash -c \"echo \\\$PAR b\"";$shell="$ENV{SHELL}";$tmpdir="/tmp/parallel-local-ssh1-tmpdir";$nice=1;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$shell,"-c",($bashfunc."@ARGV");die"exec:$!\n";}do{$s=$s<1?0.001+$s*1.03:$s;select(undef,undef,undef,$s);}until($done||getppid==1);kill(SIGHUP,-${pid})unless$done;wait;exit($?&127?128+($?&127):1+$?>>8)'"'";
|
2016-05-17 00:11:38 +00:00
|
|
|
a b
|
|
|
|
echo '**'
|
|
|
|
**
|
2014-07-21 15:07:48 +00:00
|
|
|
echo TODO
|
|
|
|
TODO
|
|
|
|
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|