3 # SPDX-FileCopyrightText: 2021-2024 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
5 # SPDX-License-Identifier: GPL-3.0-or-later
7 SERVER1
=parallel-server1
9 SSHLOGIN1
=$SSHUSER1@
$SERVER1
14 # If not run in dir parallel/testsuite: set testsuitedir to path of testsuite
15 testsuitedir
=${testsuitedir:-$pwd}
17 tar xjf
"$testsuitedir"/input-files
/testdir.
tar.bz2
18 #rsync -Ha --delete input-files/testdir/ tmp/
21 SERVER2
=parallel@parallel-server2
23 echo $SSHLOGIN1 >~
/.parallel
/sshloginfile
25 echo '### Test --wd newtempdir/newdir/tmp/ with space dirs';
26 ssh $SSHLOGIN1 rm -rf newtempdir
;
27 stdout parallel
-j9 -k --wd newtempdir
/newdir
/tmp
/ --basefile 1-col.txt
--trc {}.6 -S ..
-v echo ">"{}.6 ::: './ ab/c"d/ef g' ' ab/c"d/efg' .
/b
/bar .
/b
/foo
"./ ab /c' d/ ef\"g" .
/2-col.txt
'./a b/cd / ef/efg';
28 find .
-name '*.6' | LC_ALL
=C
sort
30 echo '### Test --wd /tmp/newtempdir/newdir/tmp/ with space dirs';
31 ssh $SSHLOGIN1 rm -rf /tmp
/newtempdir
;
32 stdout parallel
-j9 -k --wd /tmp
/newtempdir
/newdir
/tmp
/ --basefile 1-col.txt
--trc {}.7 -S ..
-v echo ">"{}.7 ::: './ ab/c"d/ef g' ' ab/c"d/efg' .
/b
/bar .
/b
/foo
"./ ab /c' d/ ef\"g" .
/2-col.txt
'./a b/cd / ef/efg';
33 find .
-name '*.7' | LC_ALL
=C
sort
35 echo '### Test --workdir ...'
36 parallel
-j9 -k --workdir ...
--trc {}.1 -S ..
echo ">"{}.1 ::: 2-col.txt
37 find .
-name '*.1' | LC_ALL
=C
sort
39 echo '### Test --wd ...'
40 parallel
-k --wd ...
--trc {}.2 -S ..
-v echo ">"{}.2 ::: 2-col.txt
41 find .
-name '*.2' | LC_ALL
=C
sort
43 echo '### Test --wd ... with space dirs'
44 stdout parallel
-j9 -k --wd ...
--trc {}.3 -S ..
-v echo ">"{}.3 ::: './ ab/c"d/ef g' ' ab/c"d/efg' .
/b
/bar .
/b
/foo
"./ ab /c' d/ ef\"g" .
/2-col.txt
'./a b/cd / ef/efg'
45 # A few rmdir errors are OK as we have multiple files in the same dirs
46 find .
-name '*.3' | LC_ALL
=C
sort
48 echo '### Test --wd tmpdir'
49 parallel
-j9 -k --wd tmpdir
--basefile 1-col.txt
--trc {}.4 -S ..
-v echo ">"{}.4 ::: 2-col.txt
50 find .
-name '*.4' | LC_ALL
=C
sort
52 echo '### Test --wd /tmp/ with space dirs'
53 stdout parallel
-k -j9 --wd /tmp
/ --basefile 1-col.txt
--trc {}.5 -S ..
-v echo ">"{}.5 ::: './ ab/c"d/ef g' ' ab/c"d/efg' .
/b
/bar .
/b
/foo
"./ ab /c' d/ ef\"g" .
/2-col.txt
'./a b/cd / ef/efg'
54 # A few rmdir errors are OK as we have multiple files in the same dirs
55 find .
-name '*.5' | LC_ALL
=C
sort