parallel: passes unittest

This commit is contained in:
Ole Tange 2010-12-04 15:47:01 +01:00
parent 01f3a08b55
commit f3b7af993a
3 changed files with 16 additions and 27 deletions

2
.gitignore vendored
View file

@ -15,3 +15,5 @@ src/sem.1
src/sem.html
src/sql.1
src/sql.html
src/niceload.1
src/niceload.html

View file

@ -134,29 +134,14 @@ download at: http://ftp.gnu.org/gnu/parallel/
New in this release:
* Implemented {/} for the input line with the path removed (basename).
* Implemented --tmpdir to buffer standard output and standard error in
a different place.
* Implemented {/.} for the input line with extension and path removed
(basename).
* Implemented --load to wait until the load is below a limit before
starting another job on that computer.
* Output from --progress is now sent to standard error instead of
standard output.
* --eta was broken and counted down from 0. Now fixed.
* Standard output and standard error are flushed after every job so if
standard output does not end with a newline it will still be grouped
with the rest of standard output.
* --command, -c, --file, and -f are now removed as options. They were
never used in practice.
* GetOptionsFromArray rewritten to work with old Perl libraries.
* The file COPYING now contains the GNU General Public License 3
* Major rewrite to make the code more object oriented and easier to
maintain in the future.
* Review with focus on clusters. Thanks to Taylor Gillespie
http://www.unixpronews.com/unixpronews-49-20101019GNUParallelSpeedUpProcessingWithMulticoresClusters.html
= About GNU Parallel =

View file

@ -509,9 +509,12 @@ Implies B<-X> unless B<-m> is set.
=item B<--load> I<max-load> (experimental)
Do not start new jobs unless the load is less than I<max-load>. The
load average is only sampled every 10 seconds to avoid stressing small
machines.
Do not start new jobs on a given machine unless the load is less than
I<max-load>. I<max-load> uses the same syntax as B<--jobs>, so I<100%>
is a valid setting.
The load average is only sampled every 10 seconds to avoid stressing
small machines.
=item B<--controlmaster> (experimental)
@ -2993,8 +2996,7 @@ sub cleanup {
sub shell_quote {
my (@strings) = (@_);
my $arg;
for $arg (@strings) {
for my $a (@strings) {
$a =~ s/([\002-\011\013-\032\\\#\?\`\(\)\*\>\<\~\|\; \"\!\$\&\'])/\\$1/g;
$a =~ s/[\n]/'\n'/g; # filenames with '\n' is quoted using \'
# $arg =~ s/\\/\\\\/g;
@ -3177,7 +3179,7 @@ sub drain_job_queue {
start_more_jobs(); # These jobs may not be started because of loadavg
sleep 1;
}
} while (not $Global::JobQueue->empty());
} while (not $Global::start_no_new_jobs and not $Global::JobQueue->empty());
if($::opt_progress) {
print $Global::original_stderr "\n";