Fixed bug #45842: Do not evaluate {= =} twice.

This commit is contained in:
Ole Tange 2015-08-31 01:57:14 +02:00
parent 18ab03c98d
commit e65907fe88
10 changed files with 920 additions and 834 deletions

View file

@ -225,6 +225,12 @@ Haiku of the month:
New in this release:
* GNU Parallel was cited in: Flexible Modeling of Epidemics with an Empirical Bayes Framework http://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1004382
* GNU Parallel was cited in: BL1: 2D Potts Model with a Twist https://sucs.swan.ac.uk/~rjames93/Dissertation.pdf
* << kontakt GNU Parallel was used (unfortunately without citation) in: Instrumentation and Trace Analysis for Ad-hoc Python Workflows in Cloud Environments http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7214035>>
* <<Har angiveligt submittet ny version - afventer opdatering>> GNU Parallel was used (unfortunately without citation) in: MUGBAS: a species free gene-based programme suite for post-GWAS analysis http://www.ncbi.nlm.nih.gov/pubmed/25765345
* <<Afventer updateret publisering>> GNU Parallel was used in: Large Scale Author Name Disambiguation in Digital Libraries http://ieeexplore.ieee.org/xpl/abstractReferences.jsp?tp=&arnumber=7004487&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D7004487

View file

@ -3261,7 +3261,7 @@ sub kill_sleep {
my $sleepsum = 0;
my $sleep = 0.001;
my @dead;
while(@pids and $sleepsum < $sleep_max) {
if($Global::killall) {
# Killall => don't run reaper
@ -7784,6 +7784,8 @@ sub new {
'seq' => $seq,
'len' => \%len,
'arg_list' => [],
'arg_list_flat' => [],
'arg_list_flat_orig' => [undef],
'arg_queue' => $arg_queue,
'max_number_of_args' => $max_number_of_args,
'replacecount' => \%replacecount,
@ -7911,19 +7913,23 @@ sub push {
# Returns: N/A
my $self = shift;
my $record = shift;
push @{$self->{'arg_list_flat_orig'}}, map { $_->orig() } @$record;
push @{$self->{'arg_list_flat'}}, @$record;
push @{$self->{'arg_list'}}, $record;
# Make @arg available for {= =}
*Arg::arg = $self->{'arg_list_flat_orig'};
my $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
my $rep;
for my $arg (@$record) {
if(defined $arg) {
for my $perlexpr (keys %{$self->{'replacecount'}}) {
# 50% faster than below
$self->{'len'}{$perlexpr} += length $arg->replace($perlexpr,$quote_arg,$self);
# $rep = $arg->replace($perlexpr,$quote_arg,$self);
# $self->{'len'}{$perlexpr} += length $rep;
# ::debug("length", "Length: ", length $rep,
# "(", $perlexpr, "=>", $rep, ")\n");
for my $perlexpr (keys %{$self->{'replacecount'}}) {
if($perlexpr =~ /^(\d+) /) {
# Positional
defined($record->[$1-1]) or next;
$self->{'len'}{$perlexpr} += length $record->[$1-1]->replace($perlexpr,$quote_arg,$self);
} else {
for my $arg (@$record) {
if(defined $arg) {
$self->{'len'}{$perlexpr} += length $arg->replace($perlexpr,$quote_arg,$self);
}
}
}
}
@ -7935,12 +7941,20 @@ sub pop {
# the last record
my $self = shift;
my $record = pop @{$self->{'arg_list'}};
# pop off arguments from @$record
splice @{$self->{'arg_list_flat_orig'}}, -($#$record+1), $#$record+1;
splice @{$self->{'arg_list_flat'}}, -($#$record+1), $#$record+1;
my $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
for my $arg (@$record) {
if(defined $arg) {
for my $perlexpr (keys %{$self->{'replacecount'}}) {
$self->{'len'}{$perlexpr} -=
length $arg->replace($perlexpr,$quote_arg,$self);
for my $perlexpr (keys %{$self->{'replacecount'}}) {
if($perlexpr =~ /^(\d+) /) {
# Positional
defined($record->[$1-1]) or next;
$self->{'len'}{$perlexpr} -= length $record->[$1-1]->replace($perlexpr,$quote_arg,$self);
} else {
for my $arg (@$record) {
if(defined $arg) {
$self->{'len'}{$perlexpr} -= length $arg->replace($perlexpr,$quote_arg,$self);
}
}
}
}
@ -7948,15 +7962,17 @@ sub pop {
}
sub pop_all {
# Remove all arguments and zeros the length of replacement strings
# Remove all arguments and zeros the length of replacement perlexpr
# Returns:
# all records
my $self = shift;
my @popped = @{$self->{'arg_list'}};
for my $replacement_string (keys %{$self->{'replacecount'}}) {
$self->{'len'}{$replacement_string} = 0;
for my $perlexpr (keys %{$self->{'replacecount'}}) {
$self->{'len'}{$perlexpr} = 0;
}
$self->{'arg_list'} = [];
$self->{'arg_list_flat_orig'} = [undef];
$self->{'arg_list_flat'} = [];
return @popped;
}
@ -8138,53 +8154,45 @@ sub replaced {
my $context_replace;
my $perl_expressions_as_re;
my @arg;
my %words_containing_replacement_strings;
sub fish_out_words_containing_replacement_strings {
my %word;
for (@target) {
my $tt = $_;
::debug("replace", "Target: $tt");
# Command line template:
# a{1}b{}c{}d
# becomes:
# a{=1 $_=$_ =}b{= $_=$_ =}c{= $_=$_ =}d
# becomes:
# a\257<1 $_=$_ \257>b\257< $_=$_ \257>c\257< $_=$_ \257>d
# Input A B C (no context) becomes:
# A B C => aAbA B CcA B Cd
# Input A B C (context -X) becomes:
# A B C => aAbAcAd aAbBcBd aAbCcCd
if($context_replace) {
while($tt =~ s/([^\s\257]* # before {=
if(not $words_containing_replacement_strings{$context_replace,@target}) {
my %word;
for (@target) {
my $tt = $_;
::debug("replace", "Target: $tt");
# Command line template:
# a{1}b{}c{}d
# becomes:
# a{=1 $_=$_ =}b{= $_=$_ =}c{= $_=$_ =}d
# becomes:
# a\257<1 $_=$_ \257>b\257< $_=$_ \257>c\257< $_=$_ \257>d
# Input A B C (no context) becomes:
# A B C => aAbA B CcA B Cd
# Input A B C (context -X) becomes:
# A B C => aAbAcAd aAbBcBd aAbCcCd
if($context_replace) {
while($tt =~ s/([^\s\257]* # before {=
(?:
\257< # {=
[^\257]*? # The perl expression
\257> # =}
[^\s\257]* # after =}
)+)/ /x) {
# $1 = pre \257 perlexpr \257 post
$word{"$1"} ||= 1;
}
} else {
while($tt =~ s/( (?: \257<([^\257]*?)\257>) )//x) {
# $f = \257 perlexpr \257
$word{$1} ||= 1;
# $1 = pre \257 perlexpr \257 post
$word{"$1"} ||= 1;
}
} else {
while($tt =~ s/( (?: \257<([^\257]*?)\257>) )//x) {
# $f = \257 perlexpr \257
$word{$1} ||= 1;
}
}
}
@{$words_containing_replacement_strings{$context_replace,@target}} = keys %word
}
return keys %word;
}
sub flatten_arg_list {
my $arglist_ref = shift;
@arg = ();
for my $record (@$arglist_ref) {
# $self->{'arg_list'} = [ [Arg11, Arg12], [Arg21, Arg22], [Arg31, Arg32] ]
# Merge arg-objects from records into @arg for easy access
CORE::push @arg, @$record;
}
# Add one arg if empty to allow {#} and {%} to be computed only once
if(not @arg) { @arg = (Arg->new("")); }
return @{$words_containing_replacement_strings{$context_replace,@target}};
}
sub replace_placeholders {
@ -8202,28 +8210,32 @@ sub replaced {
my $quote = shift;
my $quote_arg = shift;
my %replace;
# -X = context replace (fish_out_words_containing_replacement_strings)
$context_replace = $self->{'context_replace'};
@target = @$targetref;
::debug("replace", "Replace @target\n");
# -X = context replace
# maybe multiple input sources
# maybe --xapply
if(not @target) {
# @target is empty: Return empty array
return @target;
}
# Fish out the words that have replacement strings in them
my @word = fish_out_words_containing_replacement_strings();
flatten_arg_list($self->{'arg_list'});
# Make it possible to use $arg[2] in {= =}
@Arg::arg = (undef, map { $_->orig() } @arg);
*Arg::arg = $self->{'arg_list_flat_orig'};
# Flat list:
# $self->{'arg_list'} = [ [Arg11, Arg12], [Arg21, Arg22], [Arg31, Arg32] ]
# $self->{'arg_list_flat'} = [ Arg11, Arg12, Arg21, Arg22, Arg31, Arg32 ]
if(not @{$self->{'arg_list_flat'}}) {
@{$self->{'arg_list_flat'}} = Arg->new("");
}
my $argref = $self->{'arg_list_flat'};
# Number of arguments - used for positional arguments
my $n = $#arg+1;
my $n = $#$argref+1;
# This is actually a CommandLine-object,
# $self is actually a CommandLine-object,
# but it looks nice to be able to say {= $job->slot() =}
my $job = $self;
for my $word (@word) {
# Fish out the words that have replacement strings in them
for my $word (
fish_out_words_containing_replacement_strings()) {
# word = AB \257< perlexpr \257> CD \257< perlexpr \257> EF
::debug("replace", "Replacing in $word\n");
my $normal_replace;
@ -8233,7 +8245,7 @@ sub replaced {
# push to replace word value
$perl_expressions_as_re ||=
join("|", map {s/^-?\d+//; "\Q$_\E"} keys %{$self->{'replacecount'}});
for my $arg (@arg) {
for my $arg (@$argref) {
my $val = $word;
# Replace {= perl expr =} with value for each arg
$val =~ s{\257<(-?\d+)?($perl_expressions_as_re)\257>}
@ -8241,8 +8253,8 @@ sub replaced {
if($1) {
# Positional replace
# Find the relevant arg and replace it
($arg[$1 > 0 ? $1-1 : $n+$1] ? # If defined: replace
$arg[$1 > 0 ? $1-1 : $n+$1]->
($argref->[$1 > 0 ? $1-1 : $n+$1] ? # If defined: replace
$argref->[$1 > 0 ? $1-1 : $n+$1]->
replace($2,$quote_arg,$self)
: "");
} else {
@ -8265,7 +8277,6 @@ sub replaced {
if($quote) {
@target = ::shell_quote(@target);
}
# ::debug("replace", "%replace=",::my_dump(%replace),"\n");
if(%replace) {
# Substitute the replace strings with the replacement values
# Must be sorted by length if a short word is a substring of a long word
@ -8293,7 +8304,7 @@ sub new {
my $class = shift;
my $commandref = shift;
my $read_from = shift;
my $context_replace = shift;
my $context_replace = shift || 0;
my $max_number_of_args = shift;
my $return_files = shift;
my @unget = ();
@ -8828,7 +8839,13 @@ sub get {
if($opt::xapply) {
return $self->xapply_get();
} else {
return $self->nest_get();
my $arglist = $self->nest_get();
# Flush cached computed values
# To fix: parallel echo {%} ::: 1 2 ::: 4 3
if($arglist) {
map { $_->flush_cache() } @$arglist;
}
return $arglist;
}
}
@ -8973,7 +8990,6 @@ sub read_arg_from_fh {
return undef;
}
}
# ::debug("run", "read $arg\n");
# Remove delimiter
$arg =~ s:$/$::;
if($Global::end_of_file_string and
@ -9080,33 +9096,47 @@ sub Q {
# This is actually a CommandLine-object,
# but it looks nice to be able to say {= $job->slot() =}
my $job = shift;
$perlexpr =~ s/^-?\d+ +//; # Positional replace treated as normal replace
local $_;
if($Global::trim eq "n") {
$_ = $self->{'orig'};
} else {
$_ = trim_of($self->{'orig'});
}
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
if(not $perleval{$perlexpr}) {
# Make an anonymous function of the $perlexpr
# And more importantly: Compile it only once
if($perleval{$perlexpr} =
eval('sub { no strict; no warnings; my $job = shift; '.
$perlexpr.' }')) {
# All is good
$perlexpr =~ s/^(-?\d+)? *//; # Positional replace treated as normal replace
if(not $self->{'cache'}{$perlexpr}) {
# Only compute the value once
# Use $_ as the variable to change
local $_;
if($Global::trim eq "n") {
$_ = $self->{'orig'};
} else {
# The eval failed. Maybe $perlexpr is invalid perl?
::error("Cannot use $perlexpr: $@");
::wait_and_exit(255);
# Trim the input
$_ = trim_of($self->{'orig'});
}
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
if(not $perleval{$perlexpr}) {
# Make an anonymous function of the $perlexpr
# And more importantly: Compile it only once
if($perleval{$perlexpr} =
eval('sub { no strict; no warnings; my $job = shift; '.
$perlexpr.' }')) {
# All is good
} else {
# The eval failed. Maybe $perlexpr is invalid perl?
::error("Cannot use $perlexpr: $@");
::wait_and_exit(255);
}
}
# Execute the function
$perleval{$perlexpr}->($job);
$self->{'cache'}{$perlexpr} = $_;
}
# Execute the function
$perleval{$perlexpr}->($job);
return $quote ? ::shell_quote_scalar($_) : $_;
# Return the value quoted if needed
return($quote ? ::shell_quote_scalar($self->{'cache'}{$perlexpr})
: $self->{'cache'}{$perlexpr});
}
}
sub flush_cache {
# Flush cache of computed values
my $self = shift;
$self->{'cache'} = undef;
}
sub orig {
my $self = shift;
return $self->{'orig'};

View file

@ -2484,7 +2484,7 @@ For all values of x and z it runs commands like:
cat x1y*z1 > x1z1
So you end up with x1z1 .. x1z5 each containing the content of all
So you end up with x1z1 .. x5z5 each containing the content of all
values of y.

View file

@ -16,7 +16,7 @@ export SMALLDISK
sudo chmod 777 /mnt/ram
) >/dev/null 2>/dev/null
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj8 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)';
seq 10 | parallel --halt now,fail=1 true;
echo $?
@ -193,6 +193,14 @@ seq 10000 >/tmp/seq10000;
echo '**'
echo '### bug #45842: Do not evaluate {= =} twice'
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004}
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004}
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004} ::: {a..c}
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004} ::: {a..c}
echo '**'
EOF
echo '### 1 .par file from --files expected'

View file

@ -4,6 +4,82 @@
# Each should be taking 10-30s and be possible to run in parallel
# I.e.: No race conditions, no logins
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Test --halt-on-error 0';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 0;
echo $?;
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 0;
echo $?
echo '**'
echo '### Test --halt-on-error 1';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 1;
echo $?;
(echo "sleep 1;true"; echo "sleep 2; non_exist";echo "sleep 3;true";echo "sleep 4; false") | parallel -j10 --halt 1;
echo $?
echo '**'
echo '### Test --halt-on-error 2';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 2;
echo $?;
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 2;
echo $?
echo '**'
echo '### Test --halt -1';
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -1;
echo $?;
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -1;
echo $?
echo '**'
echo '### Test --halt -2';
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -2;
echo $?;
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -2;
echo $?
echo '**'
echo '### Test first dying print --halt-on-error 1';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift';
echo exit code $?
echo '### Test last dying print --halt-on-error 2';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift';
echo exit code $?
echo '### Test last dying print --halt-on-error -1';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift';
echo exit code $?
echo '### Test last dying print --halt-on-error -2';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift';
echo exit code $?
echo '**'
testhalt() {
echo '### testhalt --halt '$1;
(yes 0 | head -n 10; seq 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?;
(seq 10; yes 0 | head -n 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?;
};
export -f testhalt;
parallel -kj0 testhalt ::: now,fail=0 now,fail=1 now,fail=2 now,fail=30% now,fail=70%
soon,fail=0 soon,fail=1 soon,fail=2 soon,fail=30% soon,fail=70%
now,success=0 now,success=1 now,success=2 now,success=30% now,success=70%
soon,success=0 soon,success=1 soon,success=2 soon,success=30% now,success=70%
echo '**'
echo '### test memfree'
parallel --memfree 1k echo Free mem: ::: 1k
stdout parallel --timeout 3 --argsep II parallel --memfree 1t echo Free mem: ::: II 1t

View file

@ -11,82 +11,6 @@ echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
echo '**'
echo '### Test --halt-on-error 0';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 0;
echo $?;
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 0;
echo $?
echo '**'
echo '### Test --halt-on-error 1';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 1;
echo $?;
(echo "sleep 1;true"; echo "sleep 2; non_exist";echo "sleep 3;true";echo "sleep 4; false") | parallel -j10 --halt 1;
echo $?
echo '**'
echo '### Test --halt-on-error 2';
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 2;
echo $?;
(echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 2;
echo $?
echo '**'
echo '### Test --halt -1';
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -1;
echo $?;
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -1;
echo $?
echo '**'
echo '### Test --halt -2';
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -2;
echo $?;
(echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -2;
echo $?
echo '**'
echo '### Test first dying print --halt-on-error 1';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift';
echo exit code $?
echo '### Test last dying print --halt-on-error 2';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift';
echo exit code $?
echo '### Test last dying print --halt-on-error -1';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift';
echo exit code $?
echo '### Test last dying print --halt-on-error -2';
(echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift';
echo exit code $?
echo '**'
testhalt() {
echo '### testhalt --halt '$1;
(yes 0 | head -n 10; seq 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?;
(seq 10; yes 0 | head -n 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?;
};
export -f testhalt;
parallel -kj0 testhalt ::: now,fail=0 now,fail=1 now,fail=2 now,fail=30% now,fail=70%
soon,fail=0 soon,fail=1 soon,fail=2 soon,fail=30% soon,fail=70%
now,success=0 now,success=1 now,success=2 now,success=30% now,success=70%
soon,success=0 soon,success=1 soon,success=2 soon,success=30% now,success=70%
echo '**'
echo '### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834';
seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo

View file

@ -390,5 +390,45 @@ seq 10000 >/tmp/seq10000; parallel -j2 --pipepart -a /tmp/seq10000 --block 14
2
echo '**'
**
echo '### bug #45842: Do not evaluate {= =} twice'
### bug #45842: Do not evaluate {= =} twice
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004}
1
2
3
4
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004}
1
2
3
4
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004} ::: {a..c}
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004} ::: {a..c}
1
2
3
4
5
6
7
8
9
10
11
12
echo '**'
**
### 1 .par file from --files expected
1

View file

@ -1,3 +1,666 @@
echo '### Test --halt-on-error 0'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 0; echo $?; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 0; echo $?
### Test --halt-on-error 0
1
2
/bin/bash: non_exist: command not found
echo '**'
**
echo '### Test --halt-on-error 1'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 1; echo $?; (echo "sleep 1;true"; echo "sleep 2; non_exist";echo "sleep 3;true";echo "sleep 4; false") | parallel -j10 --halt 1; echo $?
### Test --halt-on-error 1
1
127
parallel: This job failed:
sleep 2;false
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
/bin/bash: non_exist: command not found
parallel: This job failed:
sleep 2; non_exist
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 4; false
echo '**'
**
echo '### Test --halt-on-error 2'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 2; echo $?; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 2; echo $?
### Test --halt-on-error 2
1
1
parallel: This job failed:
sleep 2;false
parallel: This job failed:
sleep 2;false
echo '**'
**
echo '### Test --halt -1'; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -1; echo $?; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -1; echo $?
### Test --halt -1
0
0
parallel: This job succeeded:
sleep 2;true
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 2;true
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
/bin/bash: non_exist: command not found
echo '**'
**
echo '### Test --halt -2'; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -2; echo $?; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -2; echo $?
### Test --halt -2
0
0
parallel: This job succeeded:
sleep 2;true
parallel: This job succeeded:
sleep 2;true
echo '**'
**
echo '### Test first dying print --halt-on-error 1'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'; echo exit code $?
### Test first dying print --halt-on-error 1
exit code 1
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 1
parallel: Starting no more jobs. Waiting for 8 jobs to finish.
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 2
parallel: Starting no more jobs. Waiting for 7 jobs to finish.
3
0
1
2
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 3
parallel: Starting no more jobs. Waiting for 6 jobs to finish.
3
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 3
parallel: Starting no more jobs. Waiting for 5 jobs to finish.
4
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 4
parallel: Starting no more jobs. Waiting for 4 jobs to finish.
5
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 5
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
6
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 6
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
7
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 7
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
8
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 8
echo '### Test last dying print --halt-on-error 2'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'; echo exit code $?
### Test last dying print --halt-on-error 2
exit code 1
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 1
echo '### Test last dying print --halt-on-error -1'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift'; echo exit code $?
### Test last dying print --halt-on-error -1
exit code 0
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 1
parallel: Starting no more jobs. Waiting for 8 jobs to finish.
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 2
parallel: Starting no more jobs. Waiting for 7 jobs to finish.
3
0
1
2
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 3
parallel: Starting no more jobs. Waiting for 6 jobs to finish.
3
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 3
parallel: Starting no more jobs. Waiting for 5 jobs to finish.
4
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 4
parallel: Starting no more jobs. Waiting for 4 jobs to finish.
5
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 5
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
6
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 6
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
7
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 7
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
8
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 8
echo '### Test last dying print --halt-on-error -2'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift'; echo exit code $?
### Test last dying print --halt-on-error -2
exit code 0
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 1
echo '**'
**
testhalt() { echo '### testhalt --halt '$1; (yes 0 | head -n 10; seq 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; (seq 10; yes 0 | head -n 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; }; export -f testhalt; parallel -kj0 testhalt ::: now,fail=0 now,fail=1 now,fail=2 now,fail=30% now,fail=70% soon,fail=0 soon,fail=1 soon,fail=2 soon,fail=30% soon,fail=70% now,success=0 now,success=1 now,success=2 now,success=30% now,success=70% soon,success=0 soon,success=1 soon,success=2 soon,success=30% now,success=70%
### testhalt --halt now,fail=0
parallel: This job failed:
sleep 1.3; exit 1
0
parallel: This job failed:
sleep 1.3; exit 1
0
### testhalt --halt now,fail=1
parallel: This job failed:
sleep 1.3; exit 1
1
parallel: This job failed:
sleep 1.3; exit 1
1
### testhalt --halt now,fail=2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
2
### testhalt --halt now,fail=30%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
30
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
30
### testhalt --halt now,fail=70%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
### testhalt --halt soon,fail=0
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
0
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
0
### testhalt --halt soon,fail=1
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
1
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
1
### testhalt --halt soon,fail=2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.5; exit 5
2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.5; exit 5
2
### testhalt --halt soon,fail=30%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 3.1; exit 7
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 3.4; exit 8
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 3.7; exit 9
30
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 3.1; exit 7
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 3.4; exit 8
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 3.7; exit 9
30
### testhalt --halt soon,fail=70%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
### testhalt --halt now,success=0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=1
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=2
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=30%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=70%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
### testhalt --halt soon,success=0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=1
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=2
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=30%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=70%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
echo '**'
**
echo '### test memfree'
### test memfree
parallel --memfree 1k echo Free mem: ::: 1k

View file

@ -6,669 +6,6 @@ echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
rm -rf parallel_test_dir
echo '**'
**
echo '### Test --halt-on-error 0'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 0; echo $?; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 0; echo $?
### Test --halt-on-error 0
1
2
/bin/bash: non_exist: command not found
echo '**'
**
echo '### Test --halt-on-error 1'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 1; echo $?; (echo "sleep 1;true"; echo "sleep 2; non_exist";echo "sleep 3;true";echo "sleep 4; false") | parallel -j10 --halt 1; echo $?
### Test --halt-on-error 1
1
127
parallel: This job failed:
sleep 2;false
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
/bin/bash: non_exist: command not found
parallel: This job failed:
sleep 2; non_exist
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 4; false
echo '**'
**
echo '### Test --halt-on-error 2'; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true") | parallel -j10 --halt-on-error 2; echo $?; (echo "sleep 1;true"; echo "sleep 2;false";echo "sleep 3;true";echo "sleep 4; non_exist") | parallel -j10 --halt 2; echo $?
### Test --halt-on-error 2
1
1
parallel: This job failed:
sleep 2;false
parallel: This job failed:
sleep 2;false
echo '**'
**
echo '### Test --halt -1'; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -1; echo $?; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -1; echo $?
### Test --halt -1
0
0
parallel: This job succeeded:
sleep 2;true
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 2;true
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
/bin/bash: non_exist: command not found
echo '**'
**
echo '### Test --halt -2'; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false") | parallel -j10 --halt-on-error -2; echo $?; (echo "sleep 1;false"; echo "sleep 2;true";echo "sleep 3;false";echo "sleep 4; non_exist") | parallel -j10 --halt -2; echo $?
### Test --halt -2
0
0
parallel: This job succeeded:
sleep 2;true
parallel: This job succeeded:
sleep 2;true
echo '**'
**
echo '### Test first dying print --halt-on-error 1'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'; echo exit code $?
### Test first dying print --halt-on-error 1
exit code 1
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 1
parallel: Starting no more jobs. Waiting for 8 jobs to finish.
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 2
parallel: Starting no more jobs. Waiting for 7 jobs to finish.
3
0
1
2
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 3
parallel: Starting no more jobs. Waiting for 6 jobs to finish.
3
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 3
parallel: Starting no more jobs. Waiting for 5 jobs to finish.
4
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 4
parallel: Starting no more jobs. Waiting for 4 jobs to finish.
5
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 5
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
6
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 6
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
7
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 7
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
8
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 8
echo '### Test last dying print --halt-on-error 2'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt 2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'; echo exit code $?
### Test last dying print --halt-on-error 2
exit code 1
0
parallel: This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 1
echo '### Test last dying print --halt-on-error -1'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -1 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift'; echo exit code $?
### Test last dying print --halt-on-error -1
exit code 0
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 1
parallel: Starting no more jobs. Waiting for 8 jobs to finish.
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 2
parallel: Starting no more jobs. Waiting for 7 jobs to finish.
3
0
1
2
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 3
parallel: Starting no more jobs. Waiting for 6 jobs to finish.
3
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 3
parallel: Starting no more jobs. Waiting for 5 jobs to finish.
4
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 4
parallel: Starting no more jobs. Waiting for 4 jobs to finish.
5
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 5
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
6
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 6
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
7
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 7
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
8
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 8
echo '### Test last dying print --halt-on-error -2'; (echo 0; echo 3; seq 0 7;echo 0; echo 8) | parallel -j10 -kq --halt -2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit not shift'; echo exit code $?
### Test last dying print --halt-on-error -2
exit code 0
0
parallel: This job succeeded:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ not\ shift 1
echo '**'
**
testhalt() { echo '### testhalt --halt '$1; (yes 0 | head -n 10; seq 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; (seq 10; yes 0 | head -n 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; }; export -f testhalt; parallel -kj0 testhalt ::: now,fail=0 now,fail=1 now,fail=2 now,fail=30% now,fail=70% soon,fail=0 soon,fail=1 soon,fail=2 soon,fail=30% soon,fail=70% now,success=0 now,success=1 now,success=2 now,success=30% now,success=70% soon,success=0 soon,success=1 soon,success=2 soon,success=30% now,success=70%
### testhalt --halt now,fail=0
parallel: This job failed:
sleep 1.3; exit 1
0
parallel: This job failed:
sleep 1.3; exit 1
0
### testhalt --halt now,fail=1
parallel: This job failed:
sleep 1.3; exit 1
1
parallel: This job failed:
sleep 1.3; exit 1
1
### testhalt --halt now,fail=2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
2
### testhalt --halt now,fail=30%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
30
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
30
### testhalt --halt now,fail=70%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
### testhalt --halt soon,fail=0
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
0
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
0
### testhalt --halt soon,fail=1
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
1
parallel: This job failed:
sleep 1.3; exit 1
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
1
### testhalt --halt soon,fail=2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.5; exit 5
2
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 1.9; exit 3
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 2.2; exit 4
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 2.5; exit 5
2
### testhalt --halt soon,fail=30%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 3.1; exit 7
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 3.4; exit 8
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 3.7; exit 9
30
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job failed:
sleep 3.1; exit 7
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job failed:
sleep 3.4; exit 8
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job failed:
sleep 3.7; exit 9
30
### testhalt --halt soon,fail=70%
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
parallel: This job failed:
sleep 1.3; exit 1
parallel: This job failed:
sleep 1.6; exit 2
parallel: This job failed:
sleep 1.9; exit 3
parallel: This job failed:
sleep 2.2; exit 4
parallel: This job failed:
sleep 2.5; exit 5
parallel: This job failed:
sleep 2.8; exit 6
parallel: This job failed:
sleep 3.1; exit 7
parallel: This job failed:
sleep 3.4; exit 8
parallel: This job failed:
sleep 3.7; exit 9
parallel: This job failed:
sleep 4; exit 10
50
### testhalt --halt now,success=0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=1
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=2
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=30%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=70%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
### testhalt --halt soon,success=0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=1
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=2
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
0
### testhalt --halt soon,success=30%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 3 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 2 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel: This job succeeded:
sleep 1; exit 0
0
### testhalt --halt now,success=70%
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
parallel: This job succeeded:
sleep 1; exit 0
50
echo '**'
**
echo '### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834'; seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo
### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834
1

View file

@ -648,6 +648,8 @@ DM_CONTROL
GLADE_CATALOG_PATH
GLADE_MODULE_PATH
GLADE_PIXMAP_PATH
GNOME_KEYRING_CONTROL
GNOME_KEYRING_PID
GPG_AGENT_INFO
GTK_IM_MODULE
HISTCONTROL