mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 15:37:56 +00:00
Passes testsuite.
This commit is contained in:
parent
eaedef9937
commit
028e24274f
|
@ -76,9 +76,9 @@ similar to B<cat | sh>.
|
|||
The I<command> must be an executable, a script, a composed command, or
|
||||
a function.
|
||||
|
||||
If it is a Bash function you need to B<export -f> the
|
||||
function first. An alias will, however, not work (see why
|
||||
http://www.perlmonks.org/index.pl?node_id=484296).
|
||||
If it is a Bash function you need to B<export -f> the function
|
||||
first. To use aliases copy the full environment as described under
|
||||
B<--env> and use B<env_parallel> instead of B<parallel>.
|
||||
|
||||
If it is a zsh function you will need to use this helper function
|
||||
B<exportf> to export and to set $SHELL to bash:
|
||||
|
|
|
@ -45,8 +45,8 @@ startvm:
|
|||
# Make sure we can reach the virtual machines
|
||||
sudo ifconfig wlan0:0 192.168.1.72
|
||||
# If they are already running: Don't fail
|
||||
VBoxManage startvm CentOS3-root:centos3 || true
|
||||
VBoxManage startvm RedHat9-root:redhat9 || true
|
||||
VBoxManage startvm CentOS3-root:centos3 || VBoxManage controlvm CentOS3-root:centos3 resume || true
|
||||
VBoxManage startvm RedHat9-root:redhat9 || VBoxManage controlvm RedHat9-root:redhat9 resume || true
|
||||
|
||||
stopvm:
|
||||
VBoxManage controlvm CentOS3-root:centos3 savestate
|
||||
|
|
1
testsuite/input-files/perllib/perl
Symbolic link
1
testsuite/input-files/perllib/perl
Symbolic link
|
@ -0,0 +1 @@
|
|||
perl32
|
|
@ -9,10 +9,13 @@ ping -c 1 freebsd7.tange.dk >/dev/null 2>&1
|
|||
ssh freebsd7.tange.dk touch .parallel/will-cite
|
||||
scp -q .*/src/{parallel,sem,sql,niceload} freebsd7.tange.dk:bin/
|
||||
|
||||
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -k -S freebsd7.tange.dk -vj9
|
||||
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -k -S freebsd7.tange.dk -vj9 -L1
|
||||
echo 'bug #40136: FreeBSD: No more processes'
|
||||
# Long line due to FreeBSD's /bin/sh stupidity
|
||||
sem --jobs 3 --id my_id -u 'echo First started; sleep 5; echo The first finished' && sem --jobs 3 --id my_id -u 'echo Second started; sleep 6; echo The second finished' && sem --jobs 3 --id my_id -u 'echo Third started; sleep 7; echo The third finished' && sem --jobs 3 --id my_id -u 'echo Fourth started; sleep 8; echo The fourth finished' && sem --wait --id my_id
|
||||
sem --jobs 3 --id my_id -u 'echo First started; sleep 5; echo The first finished' &&
|
||||
sem --jobs 3 --id my_id -u 'echo Second started; sleep 6; echo The second finished' &&
|
||||
sem --jobs 3 --id my_id -u 'echo Third started; sleep 7; echo The third finished' &&
|
||||
sem --jobs 3 --id my_id -u 'echo Fourth started; sleep 8; echo The fourth finished' &&
|
||||
sem --wait --id my_id
|
||||
|
||||
echo 'Test --compress --pipe'
|
||||
jot 1000 | parallel --compress --pipe cat | wc
|
||||
|
@ -36,9 +39,8 @@ echo 'bug #40134: FreeBSD: --shebang(-wrap) not working'
|
|||
chmod 755 ./shebang-wrap; ./shebang-wrap wrap works
|
||||
|
||||
echo 'bug #40134: FreeBSD: --shebang(-wrap) with options not working'
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap -v -k -j 0 /usr/bin/perl -w :::'; echo 'print @ARGV,"\n";') > shebang-wrap;
|
||||
chmod 755 ./shebang-wrap; ./shebang-wrap wrap works with options
|
||||
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap -v -k -j 0 /usr/bin/perl -w :::'; echo 'print @ARGV,"\n";') > shebang-wrap-opt;
|
||||
chmod 755 ./shebang-wrap-opt; ./shebang-wrap-opt wrap works with options
|
||||
|
||||
EOF
|
||||
|
||||
|
|
|
@ -3,13 +3,16 @@
|
|||
rsync -Ha --delete input-files/segfault/ tmp/
|
||||
cd tmp
|
||||
|
||||
median() { perl -e '@a=sort {$a<=>$b} <>;print $a[$#a/2]';}
|
||||
export -f median
|
||||
|
||||
# -L1 will join lines ending in ' '
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj0 -k -L1
|
||||
echo '### bug #41565: Print happens in blocks - not after each job complete'
|
||||
echo 'The timing here is important: 2 3 4 5 6'
|
||||
ping -c 7 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.2)."\n"'
|
||||
echo 'The timing here is important: a full second between each'
|
||||
ping -c 15 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
|
||||
echo '300 ms jobs:'
|
||||
ping -i .3 -c 10 lo | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(...).*/int($1*10+0.2)/e' | tail -n +2
|
||||
ping -i .3 -c 10 lo | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
|
||||
|
||||
echo '### Test --tagstring'
|
||||
nice parallel -j1 -X -v --tagstring a{}b echo ::: 3 4
|
||||
|
|
|
@ -8,7 +8,7 @@ P_WORKING="minix freebsd solaris openbsd netbsd debian aix redhat hpux qnx tru64
|
|||
|
||||
P="$P_WORKING"
|
||||
POLAR=`parallel -k echo {}.polarhome.com ::: $P`
|
||||
# Avoid the stupid /etc/issue.net banner at Polarhome
|
||||
# Avoid the stupid /etc/issue.net banner at Polarhome: -oLogLevel=quiet
|
||||
|
||||
echo '### Tests on polarhome machines'
|
||||
echo 'Setup on polarhome machines'
|
||||
|
@ -19,8 +19,8 @@ copy_and_test() {
|
|||
# scp to each polarhome machine do not work. Use cat
|
||||
# Avoid the stupid /etc/issue.net banner with -oLogLevel=quiet
|
||||
echo '### Run the test on '$H
|
||||
cat `which parallel` | ssh -oLogLevel=quiet $H 'cat > bin/p.tmp && chmod 755 bin/p.tmp && mv bin/p.tmp bin/parallel; bin/perl bin/parallel echo Works on {} ::: '$H
|
||||
cat `which parallel` | ssh -oLogLevel=quiet $H 'cat > bin/p.tmp && chmod 755 bin/p.tmp && mv bin/p.tmp bin/parallel && bin/perl bin/parallel echo Works on {} ::: '$H
|
||||
}
|
||||
export -f copy_and_test
|
||||
stdout parallel -j0 -k --timeout 80 --delay 0.1 --tag -v copy_and_test {} ::: $POLAR
|
||||
stdout parallel -j0 -k --retries 5 --timeout 80 --delay 0.1 --tag -v copy_and_test {} ::: $POLAR
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
tange@freebsd7
|
||||
echo 'bug #40136: FreeBSD: No more processes'
|
||||
bug #40136: FreeBSD: No more processes
|
||||
# Long line due to FreeBSD's /bin/sh stupidity
|
||||
sem --jobs 3 --id my_id -u 'echo First started; sleep 5; echo The first finished' && sem --jobs 3 --id my_id -u 'echo Second started; sleep 6; echo The second finished' && sem --jobs 3 --id my_id -u 'echo Third started; sleep 7; echo The third finished' && sem --jobs 3 --id my_id -u 'echo Fourth started; sleep 8; echo The fourth finished' && sem --wait --id my_id
|
||||
First started
|
||||
Second started
|
||||
|
@ -37,25 +36,22 @@ bug #40133: FreeBSD: --round-robin gives no output
|
|||
315465 315465 2097150
|
||||
echo 'bug #40134: FreeBSD: --shebang not working'
|
||||
bug #40134: FreeBSD: --shebang not working
|
||||
(echo '#!/usr/bin/env -S parallel --shebang -rk echo'; echo It; echo worked) > shebang;
|
||||
chmod 755 ./shebang; ./shebang
|
||||
(echo '#!/usr/bin/env -S parallel --shebang -rk echo'; echo It; echo worked) > shebang; chmod 755 ./shebang; ./shebang
|
||||
It
|
||||
worked
|
||||
echo 'bug #40134: FreeBSD: --shebang(-wrap) not working'
|
||||
bug #40134: FreeBSD: --shebang(-wrap) not working
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap /usr/bin/perl :::'; echo 'print @ARGV,"\n";') > shebang-wrap;
|
||||
chmod 755 ./shebang-wrap; ./shebang-wrap wrap works
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap /usr/bin/perl :::'; echo 'print @ARGV,"\n";') > shebang-wrap; chmod 755 ./shebang-wrap; ./shebang-wrap wrap works
|
||||
wrap
|
||||
works
|
||||
echo 'bug #40134: FreeBSD: --shebang(-wrap) with options not working'
|
||||
bug #40134: FreeBSD: --shebang(-wrap) with options not working
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap -v -k -j 0 /usr/bin/perl -w :::'; echo 'print @ARGV,"\n";') > shebang-wrap;
|
||||
chmod 755 ./shebang-wrap; ./shebang-wrap wrap works with options
|
||||
/usr/bin/perl -w ./shebang-wrap wrap
|
||||
(echo '#!/usr/bin/env -S parallel --shebang-wrap -v -k -j 0 /usr/bin/perl -w :::'; echo 'print @ARGV,"\n";') > shebang-wrap-opt; chmod 755 ./shebang-wrap-opt; ./shebang-wrap-opt wrap works with options
|
||||
/usr/bin/perl -w ./shebang-wrap-opt wrap
|
||||
wrap
|
||||
/usr/bin/perl -w ./shebang-wrap works
|
||||
/usr/bin/perl -w ./shebang-wrap-opt works
|
||||
works
|
||||
/usr/bin/perl -w ./shebang-wrap with
|
||||
/usr/bin/perl -w ./shebang-wrap-opt with
|
||||
with
|
||||
/usr/bin/perl -w ./shebang-wrap options
|
||||
/usr/bin/perl -w ./shebang-wrap-opt options
|
||||
options
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
echo '### bug #41565: Print happens in blocks - not after each job complete'
|
||||
### bug #41565: Print happens in blocks - not after each job complete
|
||||
echo 'The timing here is important: 2 3 4 5 6'
|
||||
The timing here is important: 2 3 4 5 6
|
||||
ping -c 7 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.2)."\n"'
|
||||
2
|
||||
echo 'The timing here is important: a full second between each'
|
||||
The timing here is important: a full second between each
|
||||
ping -c 15 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
echo '300 ms jobs:'
|
||||
300 ms jobs:
|
||||
ping -i .3 -c 10 lo | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(...).*/int($1*10+0.2)/e' | tail -n +2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
ping -i .3 -c 10 lo | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
|
||||
3
|
||||
echo '### Test --tagstring'
|
||||
### Test --tagstring
|
||||
|
|
Loading…
Reference in a new issue