mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 07:57:58 +00:00
Fixed bug #45842: Do not evaluate {= =} twice.
This commit is contained in:
parent
18ab03c98d
commit
e65907fe88
|
@ -225,6 +225,12 @@ Haiku of the month:
|
||||||
|
|
||||||
New in this release:
|
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
|
* <<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
|
* <<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
|
||||||
|
|
118
src/parallel
118
src/parallel
|
@ -7784,6 +7784,8 @@ sub new {
|
||||||
'seq' => $seq,
|
'seq' => $seq,
|
||||||
'len' => \%len,
|
'len' => \%len,
|
||||||
'arg_list' => [],
|
'arg_list' => [],
|
||||||
|
'arg_list_flat' => [],
|
||||||
|
'arg_list_flat_orig' => [undef],
|
||||||
'arg_queue' => $arg_queue,
|
'arg_queue' => $arg_queue,
|
||||||
'max_number_of_args' => $max_number_of_args,
|
'max_number_of_args' => $max_number_of_args,
|
||||||
'replacecount' => \%replacecount,
|
'replacecount' => \%replacecount,
|
||||||
|
@ -7911,19 +7913,23 @@ sub push {
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $record = shift;
|
my $record = shift;
|
||||||
|
push @{$self->{'arg_list_flat_orig'}}, map { $_->orig() } @$record;
|
||||||
|
push @{$self->{'arg_list_flat'}}, @$record;
|
||||||
push @{$self->{'arg_list'}}, $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 $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
|
||||||
my $rep;
|
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) {
|
for my $arg (@$record) {
|
||||||
if(defined $arg) {
|
if(defined $arg) {
|
||||||
for my $perlexpr (keys %{$self->{'replacecount'}}) {
|
|
||||||
# 50% faster than below
|
|
||||||
$self->{'len'}{$perlexpr} += length $arg->replace($perlexpr,$quote_arg,$self);
|
$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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7935,12 +7941,20 @@ sub pop {
|
||||||
# the last record
|
# the last record
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $record = pop @{$self->{'arg_list'}};
|
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;
|
my $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
|
||||||
|
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) {
|
for my $arg (@$record) {
|
||||||
if(defined $arg) {
|
if(defined $arg) {
|
||||||
for my $perlexpr (keys %{$self->{'replacecount'}}) {
|
$self->{'len'}{$perlexpr} -= length $arg->replace($perlexpr,$quote_arg,$self);
|
||||||
$self->{'len'}{$perlexpr} -=
|
}
|
||||||
length $arg->replace($perlexpr,$quote_arg,$self);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7948,15 +7962,17 @@ sub pop {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub pop_all {
|
sub pop_all {
|
||||||
# Remove all arguments and zeros the length of replacement strings
|
# Remove all arguments and zeros the length of replacement perlexpr
|
||||||
# Returns:
|
# Returns:
|
||||||
# all records
|
# all records
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my @popped = @{$self->{'arg_list'}};
|
my @popped = @{$self->{'arg_list'}};
|
||||||
for my $replacement_string (keys %{$self->{'replacecount'}}) {
|
for my $perlexpr (keys %{$self->{'replacecount'}}) {
|
||||||
$self->{'len'}{$replacement_string} = 0;
|
$self->{'len'}{$perlexpr} = 0;
|
||||||
}
|
}
|
||||||
$self->{'arg_list'} = [];
|
$self->{'arg_list'} = [];
|
||||||
|
$self->{'arg_list_flat_orig'} = [undef];
|
||||||
|
$self->{'arg_list_flat'} = [];
|
||||||
return @popped;
|
return @popped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8138,8 +8154,10 @@ sub replaced {
|
||||||
my $context_replace;
|
my $context_replace;
|
||||||
my $perl_expressions_as_re;
|
my $perl_expressions_as_re;
|
||||||
my @arg;
|
my @arg;
|
||||||
|
my %words_containing_replacement_strings;
|
||||||
|
|
||||||
sub fish_out_words_containing_replacement_strings {
|
sub fish_out_words_containing_replacement_strings {
|
||||||
|
if(not $words_containing_replacement_strings{$context_replace,@target}) {
|
||||||
my %word;
|
my %word;
|
||||||
for (@target) {
|
for (@target) {
|
||||||
my $tt = $_;
|
my $tt = $_;
|
||||||
|
@ -8172,19 +8190,9 @@ sub replaced {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return keys %word;
|
@{$words_containing_replacement_strings{$context_replace,@target}} = keys %word
|
||||||
}
|
}
|
||||||
|
return @{$words_containing_replacement_strings{$context_replace,@target}};
|
||||||
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("")); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub replace_placeholders {
|
sub replace_placeholders {
|
||||||
|
@ -8202,28 +8210,32 @@ sub replaced {
|
||||||
my $quote = shift;
|
my $quote = shift;
|
||||||
my $quote_arg = shift;
|
my $quote_arg = shift;
|
||||||
my %replace;
|
my %replace;
|
||||||
|
# -X = context replace (fish_out_words_containing_replacement_strings)
|
||||||
$context_replace = $self->{'context_replace'};
|
$context_replace = $self->{'context_replace'};
|
||||||
@target = @$targetref;
|
@target = @$targetref;
|
||||||
::debug("replace", "Replace @target\n");
|
::debug("replace", "Replace @target\n");
|
||||||
# -X = context replace
|
|
||||||
# maybe multiple input sources
|
|
||||||
# maybe --xapply
|
|
||||||
if(not @target) {
|
if(not @target) {
|
||||||
# @target is empty: Return empty array
|
# @target is empty: Return empty array
|
||||||
return @target;
|
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 {= =}
|
# 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
|
# 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() =}
|
# but it looks nice to be able to say {= $job->slot() =}
|
||||||
my $job = $self;
|
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
|
# word = AB \257< perlexpr \257> CD \257< perlexpr \257> EF
|
||||||
::debug("replace", "Replacing in $word\n");
|
::debug("replace", "Replacing in $word\n");
|
||||||
my $normal_replace;
|
my $normal_replace;
|
||||||
|
@ -8233,7 +8245,7 @@ sub replaced {
|
||||||
# push to replace word value
|
# push to replace word value
|
||||||
$perl_expressions_as_re ||=
|
$perl_expressions_as_re ||=
|
||||||
join("|", map {s/^-?\d+//; "\Q$_\E"} keys %{$self->{'replacecount'}});
|
join("|", map {s/^-?\d+//; "\Q$_\E"} keys %{$self->{'replacecount'}});
|
||||||
for my $arg (@arg) {
|
for my $arg (@$argref) {
|
||||||
my $val = $word;
|
my $val = $word;
|
||||||
# Replace {= perl expr =} with value for each arg
|
# Replace {= perl expr =} with value for each arg
|
||||||
$val =~ s{\257<(-?\d+)?($perl_expressions_as_re)\257>}
|
$val =~ s{\257<(-?\d+)?($perl_expressions_as_re)\257>}
|
||||||
|
@ -8241,8 +8253,8 @@ sub replaced {
|
||||||
if($1) {
|
if($1) {
|
||||||
# Positional replace
|
# Positional replace
|
||||||
# Find the relevant arg and replace it
|
# Find the relevant arg and replace it
|
||||||
($arg[$1 > 0 ? $1-1 : $n+$1] ? # If defined: replace
|
($argref->[$1 > 0 ? $1-1 : $n+$1] ? # If defined: replace
|
||||||
$arg[$1 > 0 ? $1-1 : $n+$1]->
|
$argref->[$1 > 0 ? $1-1 : $n+$1]->
|
||||||
replace($2,$quote_arg,$self)
|
replace($2,$quote_arg,$self)
|
||||||
: "");
|
: "");
|
||||||
} else {
|
} else {
|
||||||
|
@ -8265,7 +8277,6 @@ sub replaced {
|
||||||
if($quote) {
|
if($quote) {
|
||||||
@target = ::shell_quote(@target);
|
@target = ::shell_quote(@target);
|
||||||
}
|
}
|
||||||
# ::debug("replace", "%replace=",::my_dump(%replace),"\n");
|
|
||||||
if(%replace) {
|
if(%replace) {
|
||||||
# Substitute the replace strings with the replacement values
|
# Substitute the replace strings with the replacement values
|
||||||
# Must be sorted by length if a short word is a substring of a long word
|
# 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 $class = shift;
|
||||||
my $commandref = shift;
|
my $commandref = shift;
|
||||||
my $read_from = shift;
|
my $read_from = shift;
|
||||||
my $context_replace = shift;
|
my $context_replace = shift || 0;
|
||||||
my $max_number_of_args = shift;
|
my $max_number_of_args = shift;
|
||||||
my $return_files = shift;
|
my $return_files = shift;
|
||||||
my @unget = ();
|
my @unget = ();
|
||||||
|
@ -8828,7 +8839,13 @@ sub get {
|
||||||
if($opt::xapply) {
|
if($opt::xapply) {
|
||||||
return $self->xapply_get();
|
return $self->xapply_get();
|
||||||
} else {
|
} 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;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# ::debug("run", "read $arg\n");
|
|
||||||
# Remove delimiter
|
# Remove delimiter
|
||||||
$arg =~ s:$/$::;
|
$arg =~ s:$/$::;
|
||||||
if($Global::end_of_file_string and
|
if($Global::end_of_file_string and
|
||||||
|
@ -9080,11 +9096,15 @@ sub Q {
|
||||||
# This is actually a CommandLine-object,
|
# This is actually a CommandLine-object,
|
||||||
# but it looks nice to be able to say {= $job->slot() =}
|
# but it looks nice to be able to say {= $job->slot() =}
|
||||||
my $job = shift;
|
my $job = shift;
|
||||||
$perlexpr =~ s/^-?\d+ +//; # Positional replace treated as normal replace
|
$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 $_;
|
local $_;
|
||||||
if($Global::trim eq "n") {
|
if($Global::trim eq "n") {
|
||||||
$_ = $self->{'orig'};
|
$_ = $self->{'orig'};
|
||||||
} else {
|
} else {
|
||||||
|
# Trim the input
|
||||||
$_ = trim_of($self->{'orig'});
|
$_ = trim_of($self->{'orig'});
|
||||||
}
|
}
|
||||||
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
|
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
|
||||||
|
@ -9103,8 +9123,18 @@ sub Q {
|
||||||
}
|
}
|
||||||
# Execute the function
|
# Execute the function
|
||||||
$perleval{$perlexpr}->($job);
|
$perleval{$perlexpr}->($job);
|
||||||
return $quote ? ::shell_quote_scalar($_) : $_;
|
$self->{'cache'}{$perlexpr} = $_;
|
||||||
}
|
}
|
||||||
|
# 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 {
|
sub orig {
|
||||||
|
|
|
@ -2484,7 +2484,7 @@ For all values of x and z it runs commands like:
|
||||||
|
|
||||||
cat x1y*z1 > x1z1
|
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.
|
values of y.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export SMALLDISK
|
||||||
sudo chmod 777 /mnt/ram
|
sudo chmod 777 /mnt/ram
|
||||||
) >/dev/null 2>/dev/null
|
) >/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)';
|
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)';
|
||||||
seq 10 | parallel --halt now,fail=1 true;
|
seq 10 | parallel --halt now,fail=1 true;
|
||||||
echo $?
|
echo $?
|
||||||
|
@ -193,6 +193,14 @@ seq 10000 >/tmp/seq10000;
|
||||||
|
|
||||||
echo '**'
|
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
|
EOF
|
||||||
echo '### 1 .par file from --files expected'
|
echo '### 1 .par file from --files expected'
|
||||||
|
|
|
@ -4,6 +4,82 @@
|
||||||
# Each should be taking 10-30s and be possible to run in parallel
|
# Each should be taking 10-30s and be possible to run in parallel
|
||||||
# I.e.: No race conditions, no logins
|
# 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
|
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'
|
echo '### test memfree'
|
||||||
parallel --memfree 1k echo Free mem: ::: 1k
|
parallel --memfree 1k echo Free mem: ::: 1k
|
||||||
stdout parallel --timeout 3 --argsep II parallel --memfree 1t echo Free mem: ::: II 1t
|
stdout parallel --timeout 3 --argsep II parallel --memfree 1t echo Free mem: ::: II 1t
|
||||||
|
|
|
@ -11,82 +11,6 @@ echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
|
||||||
|
|
||||||
echo '**'
|
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';
|
echo '### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834';
|
||||||
seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo
|
seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo
|
||||||
|
|
||||||
|
|
|
@ -390,5 +390,45 @@ seq 10000 >/tmp/seq10000; parallel -j2 --pipepart -a /tmp/seq10000 --block 14
|
||||||
2
|
2
|
||||||
echo '**'
|
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 .par file from --files expected
|
||||||
1
|
1
|
||||||
|
|
|
@ -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'
|
echo '### test memfree'
|
||||||
### test memfree
|
### test memfree
|
||||||
parallel --memfree 1k echo Free mem: ::: 1k
|
parallel --memfree 1k echo Free mem: ::: 1k
|
||||||
|
|
|
@ -6,669 +6,6 @@ echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
|
||||||
rm -rf parallel_test_dir
|
rm -rf parallel_test_dir
|
||||||
echo '**'
|
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
|
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
|
### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834
|
||||||
1
|
1
|
||||||
|
|
|
@ -648,6 +648,8 @@ DM_CONTROL
|
||||||
GLADE_CATALOG_PATH
|
GLADE_CATALOG_PATH
|
||||||
GLADE_MODULE_PATH
|
GLADE_MODULE_PATH
|
||||||
GLADE_PIXMAP_PATH
|
GLADE_PIXMAP_PATH
|
||||||
|
GNOME_KEYRING_CONTROL
|
||||||
|
GNOME_KEYRING_PID
|
||||||
GPG_AGENT_INFO
|
GPG_AGENT_INFO
|
||||||
GTK_IM_MODULE
|
GTK_IM_MODULE
|
||||||
HISTCONTROL
|
HISTCONTROL
|
||||||
|
|
Loading…
Reference in a new issue