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
|
2014-07-14 16:25:45 +00:00
|
|
|
parallel: Warning: Removed no-such.host
|
|
|
|
parallel: Error: There are no hosts left to run on.
|
2015-01-02 12:07:44 +00:00
|
|
|
echo '### Can csh propagate a variable containing \n'; export A=$(seq 3); parallel -S csh@localhost --env A bash -c \''echo "$A"'\' ::: dummy
|
|
|
|
### Can csh propagate a variable containing \n
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores'
|
2014-03-24 14:49:49 +00:00
|
|
|
### bug #41805: Idea: propagate --env for parallel --number-of-cores
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '** test_zsh'
|
2014-06-23 00:04:37 +00:00
|
|
|
** test_zsh
|
2014-11-09 23:29:42 +00:00
|
|
|
FOO=test_zsh parallel --env FOO,HOME -S zsh@lo env ::: "" |sort|egrep 'FOO|^HOME'
|
2014-06-23 00:04:37 +00:00
|
|
|
FOO=test_zsh
|
2014-11-09 23:29:42 +00:00
|
|
|
HOME=/home/tange
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '** test_zsh_filter'
|
2014-06-23 00:04:37 +00:00
|
|
|
** test_zsh_filter
|
2014-11-09 23:29:42 +00:00
|
|
|
FOO=test_zsh_filter parallel --filter-hosts --env FOO,HOME -S zsh@lo env ::: "" |sort|egrep 'FOO|^HOME'
|
2014-06-23 00:04:37 +00:00
|
|
|
FOO=test_zsh_filter
|
2014-11-09 23:29:42 +00:00
|
|
|
HOME=/home/tange
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '** test_csh'
|
2014-06-23 00:04:37 +00:00
|
|
|
** test_csh
|
2014-11-09 23:29:42 +00:00
|
|
|
FOO=test_csh parallel --env FOO,HOME -S csh@lo env ::: "" |sort|egrep 'FOO|^HOME'
|
2014-06-23 00:04:37 +00:00
|
|
|
FOO=test_csh
|
2014-11-09 23:29:42 +00:00
|
|
|
HOME=/home/tange
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '** test_csh_filter'
|
2014-06-23 00:04:37 +00:00
|
|
|
** test_csh_filter
|
2014-11-09 23:29:42 +00:00
|
|
|
FOO=test_csh_filter parallel --filter-hosts --env FOO,HOME -S csh@lo env ::: "" |sort|egrep 'FOO|^HOME'
|
2014-06-23 00:04:37 +00:00
|
|
|
FOO=test_csh_filter
|
2014-11-09 23:29:42 +00:00
|
|
|
HOME=/home/tange
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '** bug #41805 done'
|
2014-06-23 00:04:37 +00:00
|
|
|
** bug #41805 done
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Deal with long command lines on remote servers'
|
2014-02-04 19:08:36 +00:00
|
|
|
### Deal with long command lines on remote servers
|
2014-07-15 00:40:38 +00:00
|
|
|
perl -e 'print((("\""x10000)."\n")x10)' | parallel -j1 -S lo -N 10000 echo {} |wc
|
2014-02-04 19:08:36 +00:00
|
|
|
4 10 100010
|
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
|
|
|
|
5
|
|
|
|
Block_end
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### --env _'
|
2013-08-14 18:11:00 +00:00
|
|
|
### --env _
|
2014-07-15 00:40:38 +00:00
|
|
|
fUbAr="OK FUBAR" parallel -S parallel@lo --env _ echo '$fUbAr $DEBEMAIL' ::: test
|
2013-11-22 17:24:09 +00:00
|
|
|
OK FUBAR test
|
2014-07-15 00:40:38 +00:00
|
|
|
fUbAr="OK FUBAR" parallel -S csh@lo --env _ echo '$fUbAr $DEBEMAIL' ::: test
|
2014-06-23 00:04:37 +00:00
|
|
|
DEBEMAIL: Undefined variable.
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### --env _ with explicit mentioning of normally ignored var $DEBEMAIL'
|
2013-10-21 20:31:52 +00:00
|
|
|
### --env _ with explicit mentioning of normally ignored var $DEBEMAIL
|
2014-07-15 00:40:38 +00:00
|
|
|
fUbAr="OK FUBAR" parallel -S parallel@lo --env DEBEMAIL,_ echo '$fUbAr $DEBEMAIL' ::: test
|
2013-10-21 20:31:52 +00:00
|
|
|
OK FUBAR ole@tange.dk test
|
2014-07-15 00:40:38 +00:00
|
|
|
fUbAr="OK FUBAR" parallel -S csh@lo --env DEBEMAIL,_ echo '$fUbAr $DEBEMAIL' ::: test
|
2014-06-23 00:04:37 +00:00
|
|
|
OK FUBAR ole@tange.dk test
|
2014-07-15 00:40:38 +00:00
|
|
|
echo 'bug #40137: SHELL not bash: Warning when exporting funcs'
|
2013-09-28 15:44:54 +00:00
|
|
|
bug #40137: SHELL not bash: Warning when exporting funcs
|
2014-07-15 00:40:38 +00:00
|
|
|
. <(printf 'myfunc() {\necho $1\n}'); export -f myfunc; parallel --env myfunc -S lo myfunc ::: no_warning
|
2013-09-28 15:44:54 +00:00
|
|
|
no_warning
|
2014-07-15 00:40:38 +00:00
|
|
|
. <(printf 'myfunc() {\necho $1\n}'); export -f myfunc; SHELL=/bin/sh parallel --env myfunc -S lo myfunc ::: warning
|
2013-09-28 15:44:54 +00:00
|
|
|
warning
|
2014-11-15 14:25:19 +00:00
|
|
|
echo 'env_parallel from man page - transfer non-exported var'
|
|
|
|
env_parallel from man page - transfer non-exported var
|
|
|
|
env_parallel() { export parallel_bash_environment="$(echo "shopt -s expand_aliases 2>/dev/null"; alias;typeset -p | grep -vFf <(readonly; echo GROUPS; echo FUNCNAME; echo DIRSTACK; echo _; echo PIPESTATUS; echo USERNAME) | grep -v BASH_;typeset -f)"; `which parallel` "$@"; unset parallel_bash_environment; }; var=nonexported env_parallel -S parallel@lo echo '$var' ::: variable
|
|
|
|
nonexported variable
|
|
|
|
echo 'compared to parallel - no transfer non-exported var'
|
|
|
|
compared to parallel - no transfer non-exported var
|
|
|
|
var=nonexported parallel -S parallel@lo echo '$var' ::: variable
|
|
|
|
variable
|
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 ::: ""
|
2013-09-28 15:55:04 +00:00
|
|
|
/home/tange
|
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
|
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
|
2014-07-15 00:40:38 +00:00
|
|
|
find ~/.parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm; stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S lo -v echo ">"{}.6 ::: uNiQuE_sTrInG; find ~/.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 --
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel --wd -- -S lo echo OK ">"{}.7 ::: uNiQuE_sTrInG; cat ~/--/uNiQuE_sTrInG.7; stdout 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 " "
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel --wd " " -S lo echo OK ">"{}.8 ::: uNiQuE_sTrInG; cat ~/" "/uNiQuE_sTrInG.8; stdout 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 "'"
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel --wd "'" -S lo echo OK ">"{}.9 ::: uNiQuE_sTrInG; cat ~/"'"/uNiQuE_sTrInG.9; stdout 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
|
2014-07-15 00:40:38 +00:00
|
|
|
mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1; stdout parallel --trc {}.2 -S 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
|
2014-07-15 00:40:38 +00:00
|
|
|
mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1; stdout parallel --trc {}.2 -S 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
|
2014-07-15 00:40:38 +00:00
|
|
|
mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1; stdout parallel --trc {}.2 -S 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
|
|
|
|
mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
|
|
|
|
Content --/./--foo4
|
|
|
|
remote--/./--foo4
|
|
|
|
echo '### Test --trc ./:/./:foo5'
|
|
|
|
### Test --trc ./:/./:foo5
|
|
|
|
mkdir -p ./:; echo 'Content :/./:foo5' > ./:/./:foo5; stdout parallel --trc {}.1 -S lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:/./:foo5; cat ./:/./:foo5.1
|
|
|
|
Content :/./:foo5
|
|
|
|
remote./:/./:foo5
|
|
|
|
echo '### Test --trc ./" "/./" "foo6'
|
|
|
|
### Test --trc ./" "/./" "foo6
|
|
|
|
mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6; stdout parallel --trc {}.1 -S lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
|
|
|
|
Content _/./_foo6
|
|
|
|
remote./ /./ foo6
|
|
|
|
echo TODO
|
|
|
|
TODO
|
|
|
|
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|
|
|
|
## echo missing
|
|
|
|
## echo '### Test --trc "-- "'
|
|
|
|
## echo missing
|
|
|
|
## echo '### Test --trc " --"'
|
|
|
|
## echo missing
|
|
|
|
##
|