From 8fb1966254c6c3ddec0d8a1a0f564ec0fef90a12 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sat, 14 May 2011 01:03:09 +0200 Subject: [PATCH] test fixup. Passes test suite. --- src/parallel.pod | 23 +++++++++++++++++++++++ testsuite/wanted-results/test19 | 4 ++-- testsuite/wanted-results/test58 | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/parallel.pod b/src/parallel.pod index a71e4a7f..f7e4f71a 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -1834,6 +1834,29 @@ If there are more files than will fit on a single command line, the editor will be started again with the remaining files. +=head1 EXAMPLE: Running sudo + +B requires a password to run a command as root. It caches the +access, so you only need to enter the password again if you have not +used B for a while. + +The command: + + parallel sudo echo ::: This is a bad idea + +is no good, as you would be prompted for the sudo password for each of +the jobs. You can either do: + + sudo echo This + parallel sudo echo ::: is a good idea + +or: + + sudo parallel echo ::: This is a good idea + +This way you only have to enter the sudo password once. + + =head1 EXAMPLE: GNU Parallel as queue system/batch manager GNU B can work as a simple job queue system or batch manager. diff --git a/testsuite/wanted-results/test19 b/testsuite/wanted-results/test19 index d41fd7aa..04f04e2b 100644 --- a/testsuite/wanted-results/test19 +++ b/testsuite/wanted-results/test19 @@ -75,7 +75,7 @@ OK ls: cannot access tmp/parallel.file*: No such file or directory OK Input for ssh -parallel-server3 rsync --server -lDErRze.iLsf . . +parallel-server3 rsync --server -lDrRze.iLsf . . parallel-server3 PARALLEL_SEQ=2;export PARALLEL_SEQ;PARALLEL_PID=00000;export PARALLEL_PID; cat tmp/parallel.file.' 'newline2 > tmp/parallel.file.' 'newline2.out;cat tmp/parallel.file.' @@ -87,7 +87,7 @@ parallel-server3 rsync --server --sender -lDrRze.iLsf --remove-source-files . ./ 'newline2.out2 parallel-server3 rm -f ./tmp/parallel.file.' 'newline2; rmdir 2>/dev/null ./tmp --l parallel parallel-server2 rsync --server -lDErRze.iLsf . . +-l parallel parallel-server2 rsync --server -lDrRze.iLsf . . parallel@parallel-server2 PARALLEL_SEQ=1;export PARALLEL_SEQ;PARALLEL_PID=00000;export PARALLEL_PID; cat tmp/parallel.file.' 'newline1 > tmp/parallel.file.' 'newline1.out;cat tmp/parallel.file.' diff --git a/testsuite/wanted-results/test58 b/testsuite/wanted-results/test58 index d233a800..019f6aad 100644 --- a/testsuite/wanted-results/test58 +++ b/testsuite/wanted-results/test58 @@ -77,3 +77,35 @@ 7 5 1 7 5 2 7 5 3 +### Test -E +1 2 3 +1 2 4 +1 3 3 +1 3 4 +1 4 3 +1 4 4 +2 2 3 +2 2 4 +2 3 3 +2 3 4 +2 4 3 +2 4 4 +3 2 3 +3 2 4 +3 3 3 +3 3 4 +3 4 3 +3 4 4 +4 2 3 +4 2 4 +4 3 3 +4 3 4 +4 4 3 +4 4 4 +### Test -E one empty +1 2 +2 2 +### Test -E 2 empty +1 +2 +### Test -E all empty