From dd5fb4a08b79714606532d4b51340b38d8cd581e Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 11 Jul 2018 18:46:05 +0200 Subject: [PATCH] env_parallel: Code is now more similar for {d,b,}ash,{k,z}sh. --- doc/release_new_version | 9 +- src/env_parallel.ash | 100 +++++++--- src/env_parallel.bash | 134 +++++++------ src/env_parallel.csh | 2 +- src/env_parallel.dash | 100 +++++++--- src/env_parallel.fish | 2 +- src/env_parallel.ksh | 97 ++++++++-- src/env_parallel.pdksh | 2 +- src/env_parallel.sh | 97 +++++++--- src/env_parallel.tcsh | 2 +- src/env_parallel.zsh | 108 ++++++++--- testsuite/tests-to-run/parallel-local-100s.sh | 10 +- testsuite/tests-to-run/parallel-local-1s.sh | 72 ------- testsuite/tests-to-run/parallel-local-30s.sh | 72 +++++++ testsuite/tests-to-run/parallel-local-3s.sh | 15 +- testsuite/tests-to-run/parallel-local-sql.sh | 2 +- testsuite/tests-to-run/parallel-local-ssh2.sh | 4 +- testsuite/tests-to-run/parallel-local-ssh7.sh | 2 +- testsuite/tests-to-run/parallel-local-ssh8.sh | 4 +- testsuite/tests-to-run/parallel-local19.sh | 40 ++-- testsuite/tests-to-run/parallel-polarhome.sh | 2 +- testsuite/wanted-results/parallel-local-100s | 176 +++--------------- testsuite/wanted-results/parallel-local-1s | 143 -------------- testsuite/wanted-results/parallel-local-30s | 143 ++++++++++++++ testsuite/wanted-results/parallel-local-3s | 7 +- testsuite/wanted-results/parallel-local-ssh7 | 52 +++--- testsuite/wanted-results/parallel-local-ssh9 | 2 +- testsuite/wanted-results/parallel-local19 | 74 ++++---- 28 files changed, 822 insertions(+), 651 deletions(-) diff --git a/doc/release_new_version b/doc/release_new_version index 913bcc19..423c436f 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -207,11 +207,16 @@ GNU Parallel 20180622 ('') <<[stable]>> has been released. It is available for d Quote of the month: - <<>> - + I've been using GNU Parallel very much and effectively lately. + Such an easy way to get huge speed-ups with my simple bash/Perl/Python + programs -- parallelize them! + -- Ken Youens-Clark @kycl4rk@twitter New in this release: + +* GNU Parallel is distributed as part of Snippy https://github.com/tseemann/snippy + https://esgeeks.com/gnu-parallel-ejecutar-comandos-simultaneo-linux/ <> diff --git a/src/env_parallel.ash b/src/env_parallel.ash index d4b636e4..7ca4f047 100755 --- a/src/env_parallel.ash +++ b/src/env_parallel.ash @@ -29,7 +29,8 @@ env_parallel() { # based on env_parallel.sh _names_of_ALIASES() { - for _i in `alias | perl -ne 's/^alias //;s/^(\S+)=.*/$1/ && print' 2>/dev/null`; do + # alias fails on Unixware 5 + for _i in `alias 2>/dev/null | perl -ne 's/^alias //;s/^(\S+)=.*/$1/ && print' 2>/dev/null`; do # Check if this name really is an alias # or just part of a multiline alias definition if alias $_i >/dev/null 2>/dev/null; then @@ -71,20 +72,73 @@ env_parallel() { echo done } + _ignore_HARDCODED() { + # These names cannot be detected + echo '(_|TIMEOUT)' + } + _ignore_READONLY() { + readonly | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + # zsh: typeset -r var='val' + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - # Some versions of grep do not support -E: Use perl - # grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | - - perl -ne '/^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$/ and next; + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" + # Macos-grep does not like long patterns + # Old Solaris grep does not support -E + # Perl Version of: + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; - # Vars set by /bin/sh - /^(_|TIMEOUT)$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; print;' } - _get_ignored_VARS() { perl -e ' for(@ARGV){ @@ -123,7 +177,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -144,17 +198,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } - if _which parallel >/dev/null; then + if _which_PAR parallel >/dev/null; then true parallel found in path else - _error 'parallel must be in $PATH.' + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -225,22 +279,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if `_which true` >/dev/null 2>/dev/null ; then + if `_which_PAR true` >/dev/null 2>/dev/null ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/src/env_parallel.bash b/src/env_parallel.bash index 263e4840..ea15230f 100755 --- a/src/env_parallel.bash +++ b/src/env_parallel.bash @@ -37,9 +37,9 @@ env_parallel() { if [ $(alias $_i | wc -l) == 1 ] ; then true Alias is a single line. Good. else - _warning "Alias '$_i' contains newline." - _warning "Make sure the command has at least one newline after '$_i'." - _warning "See BUGS in 'man env_parallel'." + _warning_PAR "Alias '$_i' contains newline." + _warning_PAR "Make sure the command has at least one newline after '$_i'." + _warning_PAR "See BUGS in 'man env_parallel'." fi done alias "$@" @@ -56,48 +56,72 @@ env_parallel() { _bodies_of_VARIABLES() { typeset -p "$@" } + _ignore_HARDCODED() { + # These names cannot be detected + echo '(_|TIMEOUT|GROUPS|FUNCNAME|DIRSTACK|PIPESTATUS|USERNAME|BASH_[A-Z_]+)' + } + _ignore_READONLY() { + readonly | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + # zsh: typeset -r var='val' + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - _remove_readonly() { - _list_readonly() { - readonly | perl -pe 's/^\S+\s+\S+\s+(\S[^=]*)=.*/$1/' - } - perl -e '$r=join("|",@ARGV); while() {/$r/o or print}' `_list_readonly` - } + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" # Macos-grep does not like long patterns # Old Solaris grep does not support -E - # so 'grep' is converted to 'perl' - # Perl Version of: - # grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV)$' | - # grep -Ev '^(_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | - perl -ne '/^(_names_of_ALIASES| - _bodies_of_ALIASES| - _names_of_maybe_FUNCTIONS| - _names_of_FUNCTIONS| - _bodies_of_FUNCTIONS| - _names_of_VARIABLES| - _bodies_of_VARIABLES| - _remove_bad_NAMES| - _remove_readonly| - _prefix_PARALLEL_ENV| - _get_ignored_VARS| - _make_grep_REGEXP| - _ignore_UNDERSCORE| - _alias_NAMES| - _list_alias_BODIES| - _function_NAMES| - _list_function_BODIES| - _variable_NAMES| - _list_variable_VALUES| - _prefix_PARALLEL_ENV| - PARALLEL_TMP)$/x or print' | + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env - # perl version of: grep -E "^$_grep_REGEXP"\$ | grep -vE "^"\$ | - perl -ne "/^$_grep_REGEXP"'$/ and not /^'"$_ignore_UNDERSCORE"'$/ and print' | - _remove_readonly | - # perl version of: grep -Ev '^(BASHOPTS|BASHPID|EUID|GROUPS|FUNCNAME|DIRSTACK|_|PIPESTATUS|PPID|SHELLOPTS|UID|USERNAME|BASH_[A-Z_]+)$' - perl -ne 'not /^(BASHOPTS|BASHPID|EUID|GROUPS|FUNCNAME|DIRSTACK|_|PIPESTATUS|PPID|SHELLOPTS|UID|USERNAME|BASH_[A-Z_]+)$/ and print' + /^'"$_grep_REGEXP"'$/ or next; + /^'"$_ignore_UNDERSCORE"'$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; + print;' } _prefix_PARALLEL_ENV() { shopt 2>/dev/null | @@ -145,7 +169,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -166,17 +190,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } # Bash is broken in version 3.2.25 and 4.2.39 # The crazy '[ "`...`" == "" ]' is needed for the same reason - if [ "`_which parallel`" == "" ]; then - _error 'parallel must be in $PATH.' + if [ "`_which_PAR parallel`" == "" ]; then + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -239,7 +263,7 @@ env_parallel() { fi unset _variable_NAMES - _which_true="`_which true`" + _which_TRUE="`_which_PAR true`" # Copy shopt (so e.g. extended globbing works) # But force expand_aliases as aliases otherwise do not work PARALLEL_ENV="` @@ -255,22 +279,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if [ "`_which true`" == "$_which_true" ] ; then + if [ "`_which_PAR true`" == "$_which_TRUE" ] ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/src/env_parallel.csh b/src/env_parallel.csh index f2971926..410a17ac 100755 --- a/src/env_parallel.csh +++ b/src/env_parallel.csh @@ -75,7 +75,7 @@ else rm $_tMpscRIpt # Get the scalar and array variable names - set _vARnAmES=(`set | perl -ne 's/\s.*//; /^(#|_|killring|prompt2|command|PARALLEL_TMP)$/ and next; /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; print'`) + set _vARnAmES=(`set | perl -ne 's/\s.*//; /^(#|_|killring|prompt2|command|PARALLEL_ENV|PARALLEL_TMP)$/ and next; /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; print'`) # Make a tmpfile for the variable definitions set _tMpvARfILe=`_tempfile` diff --git a/src/env_parallel.dash b/src/env_parallel.dash index bbefd8b2..a288a8de 100755 --- a/src/env_parallel.dash +++ b/src/env_parallel.dash @@ -29,7 +29,8 @@ env_parallel() { # based on env_parallel.sh _names_of_ALIASES() { - for _i in `alias | perl -ne 's/^alias //;s/^(\S+)=.*/$1/ && print' 2>/dev/null`; do + # alias fails on Unixware 5 + for _i in `alias 2>/dev/null | perl -ne 's/^alias //;s/^(\S+)=.*/$1/ && print' 2>/dev/null`; do # Check if this name really is an alias # or just part of a multiline alias definition if alias $_i >/dev/null 2>/dev/null; then @@ -71,20 +72,73 @@ env_parallel() { echo done } + _ignore_HARDCODED() { + # These names cannot be detected + echo '(_|TIMEOUT)' + } + _ignore_READONLY() { + readonly | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + # zsh: typeset -r var='val' + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - # Some versions of grep do not support -E: Use perl - # grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | - - perl -ne '/^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$/ and next; + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" + # Macos-grep does not like long patterns + # Old Solaris grep does not support -E + # Perl Version of: + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; - # Vars set by /bin/sh - /^(_|TIMEOUT)$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; print;' } - _get_ignored_VARS() { perl -e ' for(@ARGV){ @@ -123,7 +177,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -144,17 +198,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } - if _which parallel >/dev/null; then + if _which_PAR parallel >/dev/null; then true parallel found in path else - _error 'parallel must be in $PATH.' + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -225,22 +279,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if `_which true` >/dev/null 2>/dev/null ; then + if `_which_PAR true` >/dev/null 2>/dev/null ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/src/env_parallel.fish b/src/env_parallel.fish index e40346e9..afa19091 100755 --- a/src/env_parallel.fish +++ b/src/env_parallel.fish @@ -94,7 +94,7 @@ function env_parallel # Replace \001 with \002 because \001 is used by env_parallel # Convert \n to \001 functions -n | perl -pe 's/,/\n/g' | \ - grep -Ev '^(PARALLEL_TMP)$' | \ + grep -Ev '^(PARALLEL_ENV|PARALLEL_TMP)$' | \ grep -E "^$_grep_REGEXP"\$ | grep -vE "^$_ignore_UNDERSCORE"\$ | \ while read d; functions $d; end | \ perl -pe 's/\001/\002/g and not $printed++ and print STDERR diff --git a/src/env_parallel.ksh b/src/env_parallel.ksh index bf7733ee..af28f8ba 100755 --- a/src/env_parallel.ksh +++ b/src/env_parallel.ksh @@ -56,15 +56,72 @@ env_parallel() { _bodies_of_VARIABLES() { typeset -p "$@" } + _ignore_HARDCODED() { + # These names cannot be detected + echo '(_|TIMEOUT)' + } + _ignore_READONLY() { + readonly | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" + # Macos-grep does not like long patterns + # Old Solaris grep does not support -E + # Perl Version of: + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env - grep -E "^$_grep_REGEXP"\$ | grep -vE "^$_ignore_UNDERSCORE"\$ | - # Vars set by /bin/sh - grep -Ev '^(_)$' + /^'"$_grep_REGEXP"'$/ or next; + /^'"$_ignore_UNDERSCORE"'$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; + print;' } - _get_ignored_VARS() { perl -e ' for(@ARGV){ @@ -103,7 +160,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -124,17 +181,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } - if _which parallel >/dev/null; then + if _which_PAR parallel >/dev/null; then true parallel found in path else - _error 'parallel must be in $PATH.' + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -205,22 +262,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if `_which true` >/dev/null 2>/dev/null ; then + if `_which_PAR true` >/dev/null 2>/dev/null ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/src/env_parallel.pdksh b/src/env_parallel.pdksh index f1def045..03f0cf85 100755 --- a/src/env_parallel.pdksh +++ b/src/env_parallel.pdksh @@ -50,7 +50,7 @@ env_parallel() { _tmp_READONLY="$(mktemp)" readonly > "$_tmp_READONLY" # Do not transfer vars and funcs from env_parallel - grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | + grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_ENV|PARALLEL_TMP)$' | # Filter names matching --env grep -E "^$_grep_REGEXP"\$ | grep -vE "^$_ignore_UNDERSCORE"\$ | grep -vFf $_tmp_READONLY | diff --git a/src/env_parallel.sh b/src/env_parallel.sh index 36d02010..721d0347 100755 --- a/src/env_parallel.sh +++ b/src/env_parallel.sh @@ -72,20 +72,73 @@ env_parallel() { echo done } + _ignore_HARDCODED() { + # These names cannot be detected + echo '(_|TIMEOUT)' + } + _ignore_READONLY() { + readonly | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + # zsh: typeset -r var='val' + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - # Some versions of grep do not support -E: Use perl - # grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | - - perl -ne '/^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$/ and next; + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" + # Macos-grep does not like long patterns + # Old Solaris grep does not support -E + # Perl Version of: + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; - # Vars set by /bin/sh - /^(_|TIMEOUT)$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; print;' } - _get_ignored_VARS() { perl -e ' for(@ARGV){ @@ -124,7 +177,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -145,17 +198,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } - if _which parallel >/dev/null; then + if _which_PAR parallel >/dev/null; then true parallel found in path else - _error 'parallel must be in $PATH.' + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -226,22 +279,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if `_which true` >/dev/null 2>/dev/null ; then + if `_which_PAR true` >/dev/null 2>/dev/null ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/src/env_parallel.tcsh b/src/env_parallel.tcsh index e2c02574..1106471c 100755 --- a/src/env_parallel.tcsh +++ b/src/env_parallel.tcsh @@ -75,7 +75,7 @@ else rm $_tMpscRIpt # Get the scalar and array variable names - set _vARnAmES=(`set | perl -ne 's/\s.*//; /^(#|_|killring|prompt2|command|PARALLEL_TMP)$/ and next; /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; print'`) + set _vARnAmES=(`set | perl -ne 's/\s.*//; /^(#|_|killring|prompt2|command|PARALLEL_ENV|PARALLEL_TMP)$/ and next; /^'"$_grep_REGEXP"'$/ or next; /^'"$_ignore_UNDERSCORE"'$/ and next; print'`) # Make a tmpfile for the variable definitions set _tMpvARfILe=`_tempfile` diff --git a/src/env_parallel.zsh b/src/env_parallel.zsh index dc57d41a..478a6cc8 100755 --- a/src/env_parallel.zsh +++ b/src/env_parallel.zsh @@ -49,17 +49,73 @@ env_parallel() { _bodies_of_VARIABLES() { typeset -p "$@" } + _ignore_HARDCODED() { + # These names cannot be detected + echo '([-\?\#\!\$\*\@\_0]|zsh_eval_context|ZSH_EVAL_CONTEXT|LINENO|IFS|commands|functions|options|aliases|EUID|EGID|UID|GID|dis_patchars|patchars|terminfo|galiases|keymaps|parameters|jobdirs|dirstack|functrace|funcsourcetrace|zsh_scheduled_events|dis_aliases|dis_reswords|dis_saliases|modules|reswords|saliases|widgets|userdirs|historywords|nameddirs|termcap|dis_builtins|dis_functions|jobtexts|funcfiletrace|dis_galiases|builtins|history|jobstates|funcstack)' + } + _ignore_READONLY() { + typeset -pr | perl -e '@r = map { + chomp; + # sh on UnixWare: readonly TIMEOUT + # ash: readonly var='val' + # ksh: var='val' + s/^(readonly )?([^= ]*)(=.*|)$/$2/ or + # bash: declare -ar BASH_VERSINFO=([0]="4" [1]="4") + # zsh: typeset -r var='val' + s/^\S+\s+\S+\s+(\S[^=]*)(=.*|$)/$1/; + $_ } <>; + $vars = join "|",map { quotemeta $_ } @r; + print $vars ? "($vars)" : "(,,nO,,VaRs,,)"; + ' + } _remove_bad_NAMES() { # Do not transfer vars and funcs from env_parallel - grep -Ev '^(_names_of_ALIASES|_bodies_of_ALIASES|_names_of_maybe_FUNCTIONS|_names_of_FUNCTIONS|_bodies_of_FUNCTIONS|_names_of_VARIABLES|_bodies_of_VARIABLES|_remove_bad_NAMES|_prefix_PARALLEL_ENV|_get_ignored_VARS|_make_grep_REGEXP|_ignore_UNDERSCORE|_alias_NAMES|_list_alias_BODIES|_function_NAMES|_list_function_BODIES|_variable_NAMES|_list_variable_VALUES|_prefix_PARALLEL_ENV|PARALLEL_TMP)$' | + _ignore_RO="`_ignore_READONLY`" + _ignore_HARD="`_ignore_HARDCODED`" + # Macos-grep does not like long patterns + # Old Solaris grep does not support -E + # Perl Version of: + # grep -Ev '^(...)$' | + perl -ne '/^( + PARALLEL_ENV| + PARALLEL_TMP| + _alias_NAMES| + _bodies_of_ALIASES| + _bodies_of_FUNCTIONS| + _bodies_of_VARIABLES| + _error_PAR| + _function_NAMES| + _get_ignored_VARS| + _grep_REGEXP| + _ignore_HARD| + _ignore_HARDCODED| + _ignore_READONLY| + _ignore_RO| + _ignore_UNDERSCORE| + _list_alias_BODIES| + _list_function_BODIES| + _list_variable_VALUES| + _make_grep_REGEXP| + _names_of_ALIASES| + _names_of_FUNCTIONS| + _names_of_VARIABLES| + _names_of_maybe_FUNCTIONS| + _parallel_exit_CODE| + _prefix_PARALLEL_ENV| + _prefix_PARALLEL_ENV| + _remove_bad_NAMES| + _remove_readonly| + _variable_NAMES| + _warning_PAR| + _which_PAR)$/x and next; # Filter names matching --env - grep -E "^$_grep_REGEXP"\$ | grep -vE "^$_ignore_UNDERSCORE"\$ | - grep -v '=' | - grep -Ev '^([-?#!$*@_0]|zsh_eval_context|ZSH_EVAL_CONTEXT|LINENO|IFS|commands|functions|options|aliases|EUID|EGID|UID|GID)$' | - grep -Ev '^(dis_patchars|patchars|terminfo|funcstack|galiases|keymaps|parameters|jobdirs|dirstack|functrace|funcsourcetrace|zsh_scheduled_events|dis_aliases|dis_reswords|dis_saliases|modules|reswords|saliases|widgets|userdirs|historywords|nameddirs|termcap|dis_builtins|dis_functions|jobtexts|funcfiletrace|dis_galiases|builtins|history|jobstates)$' | - grep -aFvf <(typeset -pr) + /^'"$_grep_REGEXP"'$/ or next; + /^'"$_ignore_UNDERSCORE"'$/ and next; + # Remove readonly variables + /^'"$_ignore_RO"'$/ and next; + /^'"$_ignore_HARD"'$/ and next; + print;' } - _get_ignored_VARS() { perl -e ' for(@ARGV){ @@ -98,7 +154,7 @@ env_parallel() { print $vars ? "($vars)" : "(.*)"; ' -- "$@" } - _which() { + _which_PAR() { # type returns: # ll is an alias for ls -l (in ash) # bash is a tracked alias for /bin/bash @@ -119,21 +175,17 @@ env_parallel() { s/.* is (a tracked alias for )?//); END { exit not $exit }' } - _warning() { + _warning_PAR() { echo "env_parallel: Warning: $@" >&2 } - _error() { + _error_PAR() { echo "env_parallel: Error: $@" >&2 } - - if which parallel | grep 'no parallel in' >/dev/null; then - _error 'parallel must be in $PATH.' - return 255 - fi - if which parallel >/dev/null; then - true which on linux + + if _which_PAR parallel >/dev/null; then + true parallel found in path else - _error 'parallel must be in $PATH.' + _error_PAR 'parallel must be in $PATH.' return 255 fi @@ -204,22 +256,22 @@ env_parallel() { unset _grep_REGEXP unset _ignore_UNDERSCORE # Test if environment is too big - if `_which /bin/true` >/dev/null 2>/dev/null ; then + if `_which_PAR true` >/dev/null 2>/dev/null ; then parallel "$@"; _parallel_exit_CODE=$? unset PARALLEL_ENV; return $_parallel_exit_CODE else unset PARALLEL_ENV; - _error "Your environment is too big." - _error "You can try 3 different approaches:" - _error "1. Run 'env_parallel --session' before you set" - _error " variables or define functions." - _error "2. Use --env and only mention the names to copy." - _error "3. Try running this in a clean environment once:" - _error " env_parallel --record-env" - _error " And then use '--env _'" - _error "For details see: man env_parallel" + _error_PAR "Your environment is too big." + _error_PAR "You can try 3 different approaches:" + _error_PAR "1. Run 'env_parallel --session' before you set" + _error_PAR " variables or define functions." + _error_PAR "2. Use --env and only mention the names to copy." + _error_PAR "3. Try running this in a clean environment once:" + _error_PAR " env_parallel --record-env" + _error_PAR " And then use '--env _'" + _error_PAR "For details see: man env_parallel" return 255 fi } diff --git a/testsuite/tests-to-run/parallel-local-100s.sh b/testsuite/tests-to-run/parallel-local-100s.sh index 3ffb56e0..b8f39adb 100644 --- a/testsuite/tests-to-run/parallel-local-100s.sh +++ b/testsuite/tests-to-run/parallel-local-100s.sh @@ -169,8 +169,9 @@ par_test_build_and_install() { echo "### Test normal build and install" # Make sure files depending on *.pod have to be rebuilt touch src/*pod src/sql - ./configure && - sudo stdout nice make install | + ./configure --prefix=/tmp/parallel-install && + (stdout nice make -j3 >/dev/null; + stdout nice make install) | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g' echo '### Test installation missing pod2*' @@ -178,8 +179,9 @@ par_test_build_and_install() { sudo parallel mv {} {}.hidden # Make sure files depending on *.pod have to be rebuilt touch src/*pod src/sql - ./configure && - sudo stdout nice make install | + ./configure --prefix=/tmp/parallel-install && + (stdout nice make -j3 >/dev/null; + stdout nice make install) | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g' parallel which {}.hidden ::: pod2html pod2man pod2texi pod2pdf | diff --git a/testsuite/tests-to-run/parallel-local-1s.sh b/testsuite/tests-to-run/parallel-local-1s.sh index 76c118bc..3024fb64 100644 --- a/testsuite/tests-to-run/parallel-local-1s.sh +++ b/testsuite/tests-to-run/parallel-local-1s.sh @@ -4,17 +4,6 @@ # Each should be taking 1-3s and be possible to run in parallel # I.e.: No race conditions, no logins -par_max_length_len_128k() { - echo "### BUG: The length for -X is not close to max (131072)" - - seq 1 60000 | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc - seq 1 60000 | parallel -X echo a{}b{}c |head -n 1 |wc - seq 1 60000 | parallel -X echo |head -n 1 |wc - seq 1 60000 | parallel -X echo a{}b{}c {} |head -n 1 |wc - seq 1 60000 | parallel -X echo {}aa{} |head -n 1 |wc - seq 1 60000 | parallel -X echo {} aa {} |head -n 1 |wc -} - par_fifo_under_csh() { echo '### Test --fifo under csh' @@ -54,52 +43,6 @@ par_test_XI_mI() { seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::' } -par_linebuffer_files() { - echo 'bug #48658: --linebuffer --files' - rm -rf /tmp/par48658-* - - doit() { - compress="$1" - echo "normal" - parallel --linebuffer --compress-program $compress seq ::: 100000 | - wc -l - echo "--files" - parallel --files --linebuffer --compress-program $1 seq ::: 100000 | - wc -l - echo "--results" - parallel --results /tmp/par48658-$compress --linebuffer --compress-program $compress seq ::: 100000 | - wc -l - rm -rf "/tmp/par48658-$compress" - } - export -f doit - parallel --tag -k doit ::: zstd pzstd clzip lz4 lzop pigz pxz gzip plzip pbzip2 lzma xz lzip bzip2 lbzip2 lrz -} - -par_no_newline_compress() { - echo 'bug #41613: --compress --line-buffer - no newline'; - pipe_doit() { - tagstring="$1" - compress="$2" - echo tagstring="$tagstring" compress="$compress" - perl -e 'print "O"'| - parallel "$compress" $tagstring --pipe --line-buffer cat - echo "K" - } - export -f pipe_doit - nopipe_doit() { - tagstring="$1" - compress="$2" - echo tagstring="$tagstring" compress="$compress" - parallel "$compress" $tagstring --line-buffer echo {} O ::: -n - echo "K" - } - export -f nopipe_doit - parallel -qk --header : {pipe}_doit {tagstring} {compress} \ - ::: tagstring '--tagstring {#}' -k \ - ::: compress --compress -k \ - ::: pipe pipe nopipe -} - par_failing_compressor() { echo 'Compress with failing (de)compressor' echo 'Test --tag/--line-buffer/--files in all combinations' @@ -237,21 +180,6 @@ _EOF ps aux | grep parallel[-]-lb-test } -par_macron() { - print_it() { - parallel ::: "echo $1" - parallel echo ::: "$1" - parallel echo "$1" ::: "$1" - parallel echo \""$1"\" ::: "$1" - parallel -q echo ::: "$1" - parallel -q echo "$1" ::: "$1" - parallel -q echo \""$1"\" ::: "$1" - } - print_it "$(perl -e 'print "\257"')" - print_it "$(perl -e 'print "\257\256"')" - print_it "$(perl -e 'print "\257<\257<\257>\257>"')" -} - par_header_parens() { echo 'bug #49538: --header and {= =}' diff --git a/testsuite/tests-to-run/parallel-local-30s.sh b/testsuite/tests-to-run/parallel-local-30s.sh index fb0b742f..9dc48900 100755 --- a/testsuite/tests-to-run/parallel-local-30s.sh +++ b/testsuite/tests-to-run/parallel-local-30s.sh @@ -177,6 +177,78 @@ par_test_detected_shell() { grep -Ev 'parallel: Warning: (Starting .* processes took|Consider adjusting)' } +par_linebuffer_files() { + echo 'bug #48658: --linebuffer --files' + rm -rf /tmp/par48658-* + + doit() { + compress="$1" + echo "normal" + parallel --linebuffer --compress-program $compress seq ::: 100000 | + wc -l + echo "--files" + parallel --files --linebuffer --compress-program $1 seq ::: 100000 | + wc -l + echo "--results" + parallel --results /tmp/par48658-$compress --linebuffer --compress-program $compress seq ::: 100000 | + wc -l + rm -rf "/tmp/par48658-$compress" + } + export -f doit + parallel --tag -k doit ::: zstd pzstd clzip lz4 lzop pigz pxz gzip plzip pbzip2 lzma xz lzip bzip2 lbzip2 lrz +} + +par_no_newline_compress() { + echo 'bug #41613: --compress --line-buffer - no newline'; + pipe_doit() { + tagstring="$1" + compress="$2" + echo tagstring="$tagstring" compress="$compress" + perl -e 'print "O"'| + parallel "$compress" $tagstring --pipe --line-buffer cat + echo "K" + } + export -f pipe_doit + nopipe_doit() { + tagstring="$1" + compress="$2" + echo tagstring="$tagstring" compress="$compress" + parallel "$compress" $tagstring --line-buffer echo {} O ::: -n + echo "K" + } + export -f nopipe_doit + parallel -qk --header : {pipe}_doit {tagstring} {compress} \ + ::: tagstring '--tagstring {#}' -k \ + ::: compress --compress -k \ + ::: pipe pipe nopipe +} + +par_max_length_len_128k() { + echo "### BUG: The length for -X is not close to max (131072)" + + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo a{}b{}c |head -n 1 |wc + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo |head -n 1 |wc + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo a{}b{}c {} |head -n 1 |wc + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo {}aa{} |head -n 1 |wc + seq 1 60000 | perl -pe 's/$/.gif/' | parallel -X echo {} aa {} |head -n 1 |wc +} + +par_macron() { + print_it() { + parallel ::: "echo $1" + parallel echo ::: "$1" + parallel echo "$1" ::: "$1" + parallel echo \""$1"\" ::: "$1" + parallel -q echo ::: "$1" + parallel -q echo "$1" ::: "$1" + parallel -q echo \""$1"\" ::: "$1" + } + print_it "$(perl -e 'print "\257"')" + print_it "$(perl -e 'print "\257\256"')" + print_it "$(perl -e 'print "\257<\257<\257>\257>"')" +} + export -f $(compgen -A function | grep par_) compgen -A function | grep par_ | sort | parallel -j0 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1' diff --git a/testsuite/tests-to-run/parallel-local-3s.sh b/testsuite/tests-to-run/parallel-local-3s.sh index a7f80e48..8e6dbe24 100644 --- a/testsuite/tests-to-run/parallel-local-3s.sh +++ b/testsuite/tests-to-run/parallel-local-3s.sh @@ -235,20 +235,25 @@ par_exitval_signal() { rm -f /tmp/parallel_joblog_exitval /tmp/parallel_joblog_signal } -par_do_not_export_ENV_PARALLEL() { - echo '### Do not export $ENV_PARALLEL to children' +par_do_not_export_PARALLEL_ENV() { + echo '### Do not export $PARALLEL_ENV to children' doit() { - parallel echo '{=$_="\""x$_=}' ::: 60000 | wc + echo Should be 0 + echo "$PARALLEL_ENV" | wc + echo Should give 60k and not overflow + PARALLEL_ENV="$PARALLEL_ENV" parallel echo '{=$_="\""x$_=}' ::: 60000 | wc } . `which env_parallel.bash` + # Make PARALLEL_ENV as big as possible + PARALLEL_ENV="a='$(seq 100000 | head -c $((139000-$(set|wc -c) )) )'" env_parallel doit ::: 1 } par_nice() { echo 'Check that --nice works' # parallel-20160422 OK - # wait for load < 10 - parallel --load 10 echo ::: load_10 + # wait for load < 8 + parallel --load 8 echo ::: load_10 parallel -j0 --timeout 10 --nice 18 bzip2 '<' ::: /dev/zero /dev/zero & pid=$! # Should find 2 lines diff --git a/testsuite/tests-to-run/parallel-local-sql.sh b/testsuite/tests-to-run/parallel-local-sql.sh index b736c019..011ef0dd 100755 --- a/testsuite/tests-to-run/parallel-local-sql.sh +++ b/testsuite/tests-to-run/parallel-local-sql.sh @@ -148,5 +148,5 @@ export -f $(compgen -A function | egrep 'p_|par_') # Tested that -j0 in parallel is fastest (up to 15 jobs) # more than 3 jobs: sqlite locks compgen -A function | grep par_ | sort | - stdout parallel --timeout 100 -vj3 -k --tag --joblog /tmp/jl-`basename $0` p_wrapper \ + stdout parallel --timeout 200 -vj3 -k --tag --joblog /tmp/jl-`basename $0` p_wrapper \ :::: - ::: \$MYSQL \$PG \$SQLITE diff --git a/testsuite/tests-to-run/parallel-local-ssh2.sh b/testsuite/tests-to-run/parallel-local-ssh2.sh index aea9b075..e5402ea9 100644 --- a/testsuite/tests-to-run/parallel-local-ssh2.sh +++ b/testsuite/tests-to-run/parallel-local-ssh2.sh @@ -74,9 +74,9 @@ par_env_parallel_fifo() { echo transferred non-exported func; } echo data from stdin | - env_parallel --pipe -S lo --fifo 'cat {};myfunc' + env_parallel --timeout 10 --pipe -S lo --fifo 'cat {};myfunc' echo data from stdin | - env_parallel --pipe -S lo --cat 'cat {};myfunc' + env_parallel --timeout 10 --pipe -S lo --cat 'cat {};myfunc' } par_tee_ssh() { diff --git a/testsuite/tests-to-run/parallel-local-ssh7.sh b/testsuite/tests-to-run/parallel-local-ssh7.sh index 5e681351..12f0d968 100755 --- a/testsuite/tests-to-run/parallel-local-ssh7.sh +++ b/testsuite/tests-to-run/parallel-local-ssh7.sh @@ -1610,7 +1610,7 @@ par_ksh_environment_too_big() { echo Rest should fail - bigvar="$(perl -e 'print "x"x127000')" + bigvar="$(perl -e 'print "x"x130000')" env_parallel echo ::: fail_bigvar env_parallel -S lo echo ::: fail_bigvar_remote diff --git a/testsuite/tests-to-run/parallel-local-ssh8.sh b/testsuite/tests-to-run/parallel-local-ssh8.sh index 35e764ea..7eb77c60 100644 --- a/testsuite/tests-to-run/parallel-local-ssh8.sh +++ b/testsuite/tests-to-run/parallel-local-ssh8.sh @@ -7,7 +7,7 @@ par_path_remote_bash() { rm -rf /tmp/parallel cp /usr/local/bin/parallel /tmp - cat <<'_EOS' | stdout ssh nopathbash@lo -T | grep -Ev 'For upgrade information, please visit:|updates are security updates|packages can be updated|System restart required|Welcome to|https://|Ubuntu|http://|from 13 to 17 years|mentor:|New release|do-release-upgrade|\s*^$' | uniq + cat <<'_EOS' | stdout ssh nopathbash@lo -T | grep -Ev 'For upgrade information, please visit:|updates are security updates|packages can be updated|System restart required|Welcome to|https://|Ubuntu|http://|from 13 to 17 years|mentor:|New release|do-release-upgrade|public clouds|\s*^$' | uniq echo BASH Path before: $PATH with no parallel parallel echo ::: 1 # Race condition stderr/stdout @@ -28,7 +28,7 @@ par_path_remote_csh() { rm -rf /tmp/parallel cp /usr/local/bin/parallel /tmp - cat <<'_EOS' | stdout ssh nopathcsh@lo -T | grep -Ev 'For upgrade information, please visit:|updates are security updates|packages can be updated|System restart required|Welcome to|https://|Ubuntu|http://|from 13 to 17 years|mentor:|New release|do-release-upgrade|\s*^$' | uniq + cat <<'_EOS' | stdout ssh nopathcsh@lo -T | grep -Ev 'For upgrade information, please visit:|updates are security updates|packages can be updated|System restart required|Welcome to|https://|Ubuntu|http://|from 13 to 17 years|mentor:|New release|do-release-upgrade|public clouds|\s*^$' | uniq echo CSH Path before: $PATH with no parallel which parallel >& /dev/stdout echo '^^^^^^^^ Not found is OK' diff --git a/testsuite/tests-to-run/parallel-local19.sh b/testsuite/tests-to-run/parallel-local19.sh index 38a595a3..832b9c2c 100755 --- a/testsuite/tests-to-run/parallel-local19.sh +++ b/testsuite/tests-to-run/parallel-local19.sh @@ -51,40 +51,38 @@ echo '### Test -m' seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.} seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.} -echo '### Test -m with 60000 args'; - seq 1 60000 | perl -pe 's/$/.gif/' | +echo '### Test -m with 10000 args'; + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 -echo '### Test -X with 60000 args'; - seq 1 60000 | perl -pe 's/$/.gif/' | +echo '### Test -X with 10000 args'; + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 -echo '### Test -X with 60000 args and 5 expansions' - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l +echo '### Test -X with 10000 args and 5 expansions' + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l echo '### Test {.} does not repeat more than {}' - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} + seq 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} + seq 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} echo '### Test -I with shell meta chars' - seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l - seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l - seq 1 60000 | parallel -j1 -I '<' -X echo 'a' -X echo 'a>b>c>' | wc -l + seq 10000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l + seq 10000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l + seq 10000 | parallel -j1 -I '<' -X echo 'a' -X echo 'a>b>c>' | wc -l echo '### Test {.}' @@ -94,9 +92,9 @@ echo '### Test {.}' echo '### Test -I with -X and -m' - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::' - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::' - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::' echo '### Test -i' diff --git a/testsuite/tests-to-run/parallel-polarhome.sh b/testsuite/tests-to-run/parallel-polarhome.sh index a3bfe608..933c6f11 100644 --- a/testsuite/tests-to-run/parallel-polarhome.sh +++ b/testsuite/tests-to-run/parallel-polarhome.sh @@ -69,7 +69,7 @@ doit() { par_nonall parallel echo Works on {} ::: '`hostname`' 2>&1 par_nonall "stdout parallel --tmpdir / echo ::: test read-only tmp |" \ "perl -pe '\$exit += s:/[a-z0-9_]+.arg:/XXXXXXXX.arg:gi; \$exit += s/[0-9][0-9][0-9][0-9]/0000/gi; END { exit not \$exit }' &&" \ - "echo OK" 2>&1 + "echo OK readonly tmp" 2>&1 echo echo '### Does exporting a bash function kill parallel' echo diff --git a/testsuite/wanted-results/parallel-local-100s b/testsuite/wanted-results/parallel-local-100s index 793f8377..ca40dc51 100644 --- a/testsuite/wanted-results/parallel-local-100s +++ b/testsuite/wanted-results/parallel-local-100s @@ -397,154 +397,23 @@ par_test_build_and_install configure: creating ./config.status par_test_build_and_install config.status: creating Makefile par_test_build_and_install config.status: creating src/Makefile par_test_build_and_install config.status: creating config.h +par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000' par_test_build_and_install Making install in src par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./parallel.pod > ./parallel.1n \ -par_test_build_and_install && mv ./parallel.1n ./parallel.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parallel.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./env_parallel.pod > ./env_parallel.1n \ -par_test_build_and_install && mv ./env_parallel.1n ./env_parallel.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old env_parallel.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./sem.pod > ./sem.1n \ -par_test_build_and_install && mv ./sem.1n ./sem.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old sem.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./sql > ./sql.1n \ -par_test_build_and_install && mv ./sql.1n ./sql.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old sql.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./niceload.pod > ./niceload.1n \ -par_test_build_and_install && mv ./niceload.1n ./niceload.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old niceload.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=7 ./parallel_tutorial.pod > ./parallel_tutorial.7n \ -par_test_build_and_install && mv ./parallel_tutorial.7n ./parallel_tutorial.7 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parallel_tutorial.7" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=7 ./parallel_book.pod > ./parallel_book.7n \ -par_test_build_and_install && mv ./parallel_book.7n ./parallel_book.7 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parallel_book.7" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=7 ./parallel_design.pod > ./parallel_design.7n \ -par_test_build_and_install && mv ./parallel_design.7n ./parallel_design.7 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parallel_design.7" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=7 ./parallel_alternatives.pod > ./parallel_alternatives.7n \ -par_test_build_and_install && mv ./parallel_alternatives.7n ./parallel_alternatives.7 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parallel_alternatives.7" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./parcat.pod > ./parcat.1n \ -par_test_build_and_install && mv ./parcat.1n ./parcat.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parcat.1" -par_test_build_and_install pod2man --release='00000000' --center='parallel' \ -par_test_build_and_install --section=1 ./parset.pod > ./parset.1n \ -par_test_build_and_install && mv ./parset.1n ./parset.1 \ -par_test_build_and_install || echo "Warning: pod2man not found. Using old parset.1" -par_test_build_and_install pod2html --title "GNU Parallel" ./parallel.pod > ./parallel.htmln \ -par_test_build_and_install && mv ./parallel.htmln ./parallel.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parallel.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU Parallel with environment" ./env_parallel.pod > ./env_parallel.htmln \ -par_test_build_and_install && mv ./env_parallel.htmln ./env_parallel.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old env_parallel.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU Parallel tutorial" ./parallel_tutorial.pod > ./parallel_tutorial.htmln \ -par_test_build_and_install && mv ./parallel_tutorial.htmln ./parallel_tutorial.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parallel_tutorial.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU Parallel book" ./parallel_book.pod > ./parallel_book.htmln \ -par_test_build_and_install && mv ./parallel_book.htmln ./parallel_book.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parallel_book.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU Parallel design" ./parallel_design.pod > ./parallel_design.htmln \ -par_test_build_and_install && mv ./parallel_design.htmln ./parallel_design.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parallel_design.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU Parallel alternatives" ./parallel_alternatives.pod > ./parallel_alternatives.htmln \ -par_test_build_and_install && mv ./parallel_alternatives.htmln ./parallel_alternatives.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parallel_alternatives.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "sem (GNU Parallel)" ./sem.pod > ./sem.htmln \ -par_test_build_and_install && mv ./sem.htmln ./sem.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old sem.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU SQL" ./sql > ./sql.htmln \ -par_test_build_and_install && mv ./sql.htmln ./sql.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old sql.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU niceload" ./niceload.pod > ./niceload.htmln \ -par_test_build_and_install && mv ./niceload.htmln ./niceload.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old niceload.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU parcat" ./parcat.pod > ./parcat.htmln \ -par_test_build_and_install && mv ./parcat.htmln ./parcat.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parcat.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2html --title "GNU parset" ./parset.pod > ./parset.htmln \ -par_test_build_and_install && mv ./parset.htmln ./parset.html \ -par_test_build_and_install || echo "Warning: pod2html not found. Using old parset.html" -par_test_build_and_install rm -f ./pod2htm* -par_test_build_and_install pod2texi --output=./parallel.texi ./parallel.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parallel.texi" -par_test_build_and_install pod2texi --output=./env_parallel.texi ./env_parallel.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old env_parallel.texi" -par_test_build_and_install pod2texi --output=./sem.texi ./sem.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old sem.texi" -par_test_build_and_install pod2texi --output=./sql.texi ./sql \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old sql.texi" -par_test_build_and_install pod2texi --output=./niceload.texi ./niceload.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old niceload.texi" -par_test_build_and_install pod2texi --output=./parallel_tutorial.texi ./parallel_tutorial.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parallel_tutorial.texi" -par_test_build_and_install pod2texi --output=./parallel_book.texi ./parallel_book.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parallel_book.texi" -par_test_build_and_install pod2texi --output=./parallel_design.texi ./parallel_design.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parallel_design.texi" -par_test_build_and_install pod2texi --output=./parallel_alternatives.texi ./parallel_alternatives.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parallel_alternatives.texi" -par_test_build_and_install pod2texi --output=./parcat.texi ./parcat.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parcat.texi" -par_test_build_and_install pod2texi --output=./parset.texi ./parset.pod \ -par_test_build_and_install || echo "Warning: pod2texi not found. Using old parset.texi" -par_test_build_and_install pod2pdf --output-file ./parallel.pdf ./parallel.pod --title "GNU Parallel" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parallel.pdf" -par_test_build_and_install pod2pdf --output-file ./env_parallel.pdf ./env_parallel.pod --title "GNU Parallel with environment" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old env_parallel.pdf" -par_test_build_and_install pod2pdf --output-file ./sem.pdf ./sem.pod --title "GNU sem" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old sem.pdf" -par_test_build_and_install pod2pdf --output-file ./sql.pdf ./sql --title "GNU SQL" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old sql.pdf" -par_test_build_and_install pod2pdf --output-file ./niceload.pdf ./niceload.pod --title "GNU niceload" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old niceload.pdf" -par_test_build_and_install pod2pdf --output-file ./parallel_tutorial.pdf ./parallel_tutorial.pod --title "GNU Parallel Tutorial" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parallel_tutorial.pdf" -par_test_build_and_install pod2pdf --output-file ./parallel_book.pdf ./parallel_book.pod --title "GNU Parallel Book" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parallel_book.pdf" -par_test_build_and_install pod2pdf --output-file ./parallel_design.pdf ./parallel_design.pod --title "GNU Parallel Design" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parallel_design.pdf" -par_test_build_and_install pod2pdf --output-file ./parallel_alternatives.pdf ./parallel_alternatives.pod --title "GNU Parallel alternatives" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parallel_alternatives.pdf" -par_test_build_and_install pod2pdf --output-file ./parcat.pdf ./parcat.pod --title "GNU parcat" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parcat.pdf" -par_test_build_and_install pod2pdf --output-file ./parset.pdf ./parset.pod --title "GNU parset" \ -par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parset.pdf" par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' -par_test_build_and_install /bin/mkdir -p '/usr/local/bin' -par_test_build_and_install /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/usr/local/bin' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/bin' +par_test_build_and_install /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/tmp/parallel-install/bin' par_test_build_and_install make install-exec-hook par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' -par_test_build_and_install rm /usr/local/bin/sem || true -par_test_build_and_install ln -s parallel /usr/local/bin/sem +par_test_build_and_install rm /tmp/parallel-install/bin/sem || true +par_test_build_and_install ln -s parallel /tmp/parallel-install/bin/sem par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' -par_test_build_and_install /bin/mkdir -p '/usr/local/share/doc/parallel' -par_test_build_and_install /usr/bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parallel.pdf env_parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf '/usr/local/share/doc/parallel' -par_test_build_and_install /bin/mkdir -p '/usr/local/share/man/man1' -par_test_build_and_install /usr/bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 '/usr/local/share/man/man1' -par_test_build_and_install /bin/mkdir -p '/usr/local/share/man/man7' -par_test_build_and_install /usr/bin/install -c -m 644 parallel_tutorial.7 parallel_book.7 parallel_design.7 parallel_alternatives.7 '/usr/local/share/man/man7' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/doc/parallel' +par_test_build_and_install /usr/bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parallel.pdf env_parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf '/tmp/parallel-install/share/doc/parallel' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man1' +par_test_build_and_install /usr/bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 '/tmp/parallel-install/share/man/man1' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man7' +par_test_build_and_install /usr/bin/install -c -m 644 parallel_tutorial.7 parallel_book.7 parallel_design.7 parallel_alternatives.7 '/tmp/parallel-install/share/man/man7' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000' @@ -553,6 +422,7 @@ par_test_build_and_install make[0]: Nothing to be done for 'install-exec-am'. par_test_build_and_install make[0]: Nothing to be done for 'install-data-am'. par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' +par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' par_test_build_and_install ### Test installation missing pod2* par_test_build_and_install checking for a BSD-compatible install... /usr/bin/install -c par_test_build_and_install checking whether build environment is sane... yes @@ -567,6 +437,7 @@ par_test_build_and_install config.status: creating Makefile par_test_build_and_install config.status: creating src/Makefile par_test_build_and_install config.status: creating config.h par_test_build_and_install config.status: config.h is unchanged +par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000' par_test_build_and_install Making install in src par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' par_test_build_and_install pod2man --release='00000000' --center='parallel' \ @@ -790,12 +661,12 @@ par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parset par_test_build_and_install /bin/bash: pod2pdf: command not found par_test_build_and_install Warning: pod2pdf not found. Using old parset.pdf par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' -par_test_build_and_install /bin/mkdir -p '/usr/local/bin' -par_test_build_and_install /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/usr/local/bin' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/bin' +par_test_build_and_install /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/tmp/parallel-install/bin' par_test_build_and_install make install-exec-hook par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000/src' -par_test_build_and_install rm /usr/local/bin/sem || true -par_test_build_and_install ln -s parallel /usr/local/bin/sem +par_test_build_and_install rm /tmp/parallel-install/bin/sem || true +par_test_build_and_install ln -s parallel /tmp/parallel-install/bin/sem par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install pod2html --title "GNU Parallel" ./parallel.pod > ./parallel.htmln \ par_test_build_and_install && mv ./parallel.htmln ./parallel.html \ @@ -951,8 +822,8 @@ par_test_build_and_install pod2pdf --output-file ./parset.pdf ./parset.pod --tit par_test_build_and_install || echo "Warning: pod2pdf not found. Using old parset.pdf" par_test_build_and_install /bin/bash: pod2pdf: command not found par_test_build_and_install Warning: pod2pdf not found. Using old parset.pdf -par_test_build_and_install /bin/mkdir -p '/usr/local/share/doc/parallel' -par_test_build_and_install /usr/bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parallel.pdf env_parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf '/usr/local/share/doc/parallel' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/doc/parallel' +par_test_build_and_install /usr/bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parallel.pdf env_parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf '/tmp/parallel-install/share/doc/parallel' par_test_build_and_install pod2man --release='00000000' --center='parallel' \ par_test_build_and_install --section=1 ./parallel.pod > ./parallel.1n \ par_test_build_and_install && mv ./parallel.1n ./parallel.1 \ @@ -1019,10 +890,10 @@ par_test_build_and_install && mv ./parset.1n ./parset.1 \ par_test_build_and_install || echo "Warning: pod2man not found. Using old parset.1" par_test_build_and_install /bin/bash: pod2man: command not found par_test_build_and_install Warning: pod2man not found. Using old parset.1 -par_test_build_and_install /bin/mkdir -p '/usr/local/share/man/man1' -par_test_build_and_install /usr/bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 '/usr/local/share/man/man1' -par_test_build_and_install /bin/mkdir -p '/usr/local/share/man/man7' -par_test_build_and_install /usr/bin/install -c -m 644 parallel_tutorial.7 parallel_book.7 parallel_design.7 parallel_alternatives.7 '/usr/local/share/man/man7' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man1' +par_test_build_and_install /usr/bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 '/tmp/parallel-install/share/man/man1' +par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man7' +par_test_build_and_install /usr/bin/install -c -m 644 parallel_tutorial.7 parallel_book.7 parallel_design.7 parallel_alternatives.7 '/tmp/parallel-install/share/man/man7' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install make[0]: Entering directory '/tmp/parallel-00000000' @@ -1031,6 +902,7 @@ par_test_build_and_install make[0]: Nothing to be done for 'install-exec-am'. par_test_build_and_install make[0]: Nothing to be done for 'install-data-am'. par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' +par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000' par_timeout par_timeout 2>&1 par_timeout ### test --timeout par_timeout OK diff --git a/testsuite/wanted-results/parallel-local-1s b/testsuite/wanted-results/parallel-local-1s index d29485be..0624460f 100644 --- a/testsuite/wanted-results/parallel-local-1s +++ b/testsuite/wanted-results/parallel-local-1s @@ -172,149 +172,6 @@ par_incomplete_linebuffer 7 par_incomplete_linebuffer 8 par_incomplete_linebuffer 9 par_incomplete_linebuffer 10 -par_linebuffer_files bug #48658: --linebuffer --files -par_linebuffer_files zstd normal -par_linebuffer_files zstd 100000 -par_linebuffer_files zstd --files -par_linebuffer_files zstd 1 -par_linebuffer_files zstd --results -par_linebuffer_files zstd 1 -par_linebuffer_files pzstd normal -par_linebuffer_files pzstd 100000 -par_linebuffer_files pzstd --files -par_linebuffer_files pzstd 1 -par_linebuffer_files pzstd --results -par_linebuffer_files pzstd 1 -par_linebuffer_files clzip normal -par_linebuffer_files clzip 100000 -par_linebuffer_files clzip --files -par_linebuffer_files clzip 1 -par_linebuffer_files clzip --results -par_linebuffer_files clzip 1 -par_linebuffer_files lz4 normal -par_linebuffer_files lz4 100000 -par_linebuffer_files lz4 --files -par_linebuffer_files lz4 1 -par_linebuffer_files lz4 --results -par_linebuffer_files lz4 1 -par_linebuffer_files lzop normal -par_linebuffer_files lzop 100000 -par_linebuffer_files lzop --files -par_linebuffer_files lzop 1 -par_linebuffer_files lzop --results -par_linebuffer_files lzop 1 -par_linebuffer_files pigz normal -par_linebuffer_files pigz 100000 -par_linebuffer_files pigz --files -par_linebuffer_files pigz 1 -par_linebuffer_files pigz --results -par_linebuffer_files pigz 1 -par_linebuffer_files pxz normal -par_linebuffer_files pxz 100000 -par_linebuffer_files pxz --files -par_linebuffer_files pxz 1 -par_linebuffer_files pxz --results -par_linebuffer_files pxz 1 -par_linebuffer_files gzip normal -par_linebuffer_files gzip 100000 -par_linebuffer_files gzip --files -par_linebuffer_files gzip 1 -par_linebuffer_files gzip --results -par_linebuffer_files gzip 1 -par_linebuffer_files plzip normal -par_linebuffer_files plzip 100000 -par_linebuffer_files plzip --files -par_linebuffer_files plzip 1 -par_linebuffer_files plzip --results -par_linebuffer_files plzip 1 -par_linebuffer_files pbzip2 normal -par_linebuffer_files pbzip2 100000 -par_linebuffer_files pbzip2 --files -par_linebuffer_files pbzip2 1 -par_linebuffer_files pbzip2 --results -par_linebuffer_files pbzip2 1 -par_linebuffer_files lzma normal -par_linebuffer_files lzma 100000 -par_linebuffer_files lzma --files -par_linebuffer_files lzma 1 -par_linebuffer_files lzma --results -par_linebuffer_files lzma 1 -par_linebuffer_files xz normal -par_linebuffer_files xz 100000 -par_linebuffer_files xz --files -par_linebuffer_files xz 1 -par_linebuffer_files xz --results -par_linebuffer_files xz 1 -par_linebuffer_files lzip normal -par_linebuffer_files lzip 100000 -par_linebuffer_files lzip --files -par_linebuffer_files lzip 1 -par_linebuffer_files lzip --results -par_linebuffer_files lzip 1 -par_linebuffer_files bzip2 normal -par_linebuffer_files bzip2 100000 -par_linebuffer_files bzip2 --files -par_linebuffer_files bzip2 1 -par_linebuffer_files bzip2 --results -par_linebuffer_files bzip2 1 -par_linebuffer_files lbzip2 normal -par_linebuffer_files lbzip2 100000 -par_linebuffer_files lbzip2 --files -par_linebuffer_files lbzip2 1 -par_linebuffer_files lbzip2 --results -par_linebuffer_files lbzip2 1 -par_linebuffer_files lrz normal -par_linebuffer_files lrz 100000 -par_linebuffer_files lrz --files -par_linebuffer_files lrz 1 -par_linebuffer_files lrz --results -par_linebuffer_files lrz 1 -par_macron ¯ -par_macron ¯ -par_macron ¯ ¯ -par_macron ¯ ¯ -par_macron ¯ -par_macron ¯ ¯ -par_macron "¯" ¯ -par_macron ¯® -par_macron ¯® -par_macron ¯® ¯® -par_macron ¯® ¯® -par_macron ¯® -par_macron ¯® ¯ -par_macron "¯®" ¯ -par_macron /bin/bash: -c: line 0: syntax error near unexpected token `newline' -par_macron /bin/bash: -c: line 0: `echo ¯<¯<¯>¯>' -par_macron ¯<¯<¯>¯> -par_macron /bin/bash: ¯: No such file or directory -par_macron ¯<¯<¯>¯> ¯<¯<¯>¯> -par_macron ¯<¯<¯>¯> -par_macron ¯<¯<¯>¯> ¯<¯<¯>¯> -par_macron "¯<¯<¯>¯>" ¯<¯<¯>¯> -par_max_length_len_128k ### BUG: The length for -X is not close to max (131072) -par_max_length_len_128k 1 12817 131016 -par_max_length_len_128k 1 10946 131032 -par_max_length_len_128k 1 23691 131040 -par_max_length_len_128k 1 15806 131030 -par_max_length_len_128k 1 11788 131032 -par_max_length_len_128k 1 25543 131043 -par_no_newline_compress bug #41613: --compress --line-buffer - no newline -par_no_newline_compress tagstring=--tagstring {#} compress=--compress -par_no_newline_compress 1 OK -par_no_newline_compress tagstring=--tagstring {#} compress=--compress -par_no_newline_compress 1 OK -par_no_newline_compress tagstring=--tagstring {#} compress=-k -par_no_newline_compress 1 OK -par_no_newline_compress tagstring=--tagstring {#} compress=-k -par_no_newline_compress 1 OK -par_no_newline_compress tagstring=-k compress=--compress -par_no_newline_compress OK -par_no_newline_compress tagstring=-k compress=--compress -par_no_newline_compress OK -par_no_newline_compress tagstring=-k compress=-k -par_no_newline_compress OK -par_no_newline_compress tagstring=-k compress=-k -par_no_newline_compress OK par_parset ### test parset par_parset Put output into $myarray par_parset 10 diff --git a/testsuite/wanted-results/parallel-local-30s b/testsuite/wanted-results/parallel-local-30s index dfb5eb50..c4cdc3e3 100644 --- a/testsuite/wanted-results/parallel-local-30s +++ b/testsuite/wanted-results/parallel-local-30s @@ -1,7 +1,133 @@ +par_linebuffer_files bug #48658: --linebuffer --files +par_linebuffer_files zstd normal +par_linebuffer_files zstd 100000 +par_linebuffer_files zstd --files +par_linebuffer_files zstd 1 +par_linebuffer_files zstd --results +par_linebuffer_files zstd 1 +par_linebuffer_files pzstd normal +par_linebuffer_files pzstd 100000 +par_linebuffer_files pzstd --files +par_linebuffer_files pzstd 1 +par_linebuffer_files pzstd --results +par_linebuffer_files pzstd 1 +par_linebuffer_files clzip normal +par_linebuffer_files clzip 100000 +par_linebuffer_files clzip --files +par_linebuffer_files clzip 1 +par_linebuffer_files clzip --results +par_linebuffer_files clzip 1 +par_linebuffer_files lz4 normal +par_linebuffer_files lz4 100000 +par_linebuffer_files lz4 --files +par_linebuffer_files lz4 1 +par_linebuffer_files lz4 --results +par_linebuffer_files lz4 1 +par_linebuffer_files lzop normal +par_linebuffer_files lzop 100000 +par_linebuffer_files lzop --files +par_linebuffer_files lzop 1 +par_linebuffer_files lzop --results +par_linebuffer_files lzop 1 +par_linebuffer_files pigz normal +par_linebuffer_files pigz 100000 +par_linebuffer_files pigz --files +par_linebuffer_files pigz 1 +par_linebuffer_files pigz --results +par_linebuffer_files pigz 1 +par_linebuffer_files pxz normal +par_linebuffer_files pxz 100000 +par_linebuffer_files pxz --files +par_linebuffer_files pxz 1 +par_linebuffer_files pxz --results +par_linebuffer_files pxz 1 +par_linebuffer_files gzip normal +par_linebuffer_files gzip 100000 +par_linebuffer_files gzip --files +par_linebuffer_files gzip 1 +par_linebuffer_files gzip --results +par_linebuffer_files gzip 1 +par_linebuffer_files plzip normal +par_linebuffer_files plzip 100000 +par_linebuffer_files plzip --files +par_linebuffer_files plzip 1 +par_linebuffer_files plzip --results +par_linebuffer_files plzip 1 +par_linebuffer_files pbzip2 normal +par_linebuffer_files pbzip2 100000 +par_linebuffer_files pbzip2 --files +par_linebuffer_files pbzip2 1 +par_linebuffer_files pbzip2 --results +par_linebuffer_files pbzip2 1 +par_linebuffer_files lzma normal +par_linebuffer_files lzma 100000 +par_linebuffer_files lzma --files +par_linebuffer_files lzma 1 +par_linebuffer_files lzma --results +par_linebuffer_files lzma 1 +par_linebuffer_files xz normal +par_linebuffer_files xz 100000 +par_linebuffer_files xz --files +par_linebuffer_files xz 1 +par_linebuffer_files xz --results +par_linebuffer_files xz 1 +par_linebuffer_files lzip normal +par_linebuffer_files lzip 100000 +par_linebuffer_files lzip --files +par_linebuffer_files lzip 1 +par_linebuffer_files lzip --results +par_linebuffer_files lzip 1 +par_linebuffer_files bzip2 normal +par_linebuffer_files bzip2 100000 +par_linebuffer_files bzip2 --files +par_linebuffer_files bzip2 1 +par_linebuffer_files bzip2 --results +par_linebuffer_files bzip2 1 +par_linebuffer_files lbzip2 normal +par_linebuffer_files lbzip2 100000 +par_linebuffer_files lbzip2 --files +par_linebuffer_files lbzip2 1 +par_linebuffer_files lbzip2 --results +par_linebuffer_files lbzip2 1 +par_linebuffer_files lrz normal +par_linebuffer_files lrz 100000 +par_linebuffer_files lrz --files +par_linebuffer_files lrz 1 +par_linebuffer_files lrz --results +par_linebuffer_files lrz 1 par_linebuffer_matters_compress ### (--linebuffer) --compress should give different output par_linebuffer_matters_compress OK: --linebuffer makes a difference par_linebuffer_matters_compress_tag ### (--linebuffer) --compress --tag should give different output par_linebuffer_matters_compress_tag OK: --linebuffer makes a difference +par_macron ¯ +par_macron ¯ +par_macron ¯ ¯ +par_macron ¯ ¯ +par_macron ¯ +par_macron ¯ ¯ +par_macron "¯" ¯ +par_macron ¯® +par_macron ¯® +par_macron ¯® ¯® +par_macron ¯® ¯® +par_macron ¯® +par_macron ¯® ¯ +par_macron "¯®" ¯ +par_macron /bin/bash: -c: line 0: syntax error near unexpected token `newline' +par_macron /bin/bash: -c: line 0: `echo ¯<¯<¯>¯>' +par_macron ¯<¯<¯>¯> +par_macron /bin/bash: ¯: No such file or directory +par_macron ¯<¯<¯>¯> ¯<¯<¯>¯> +par_macron ¯<¯<¯>¯> +par_macron ¯<¯<¯>¯> ¯<¯<¯>¯> +par_macron "¯<¯<¯>¯>" ¯<¯<¯>¯> +par_max_length_len_128k ### BUG: The length for -X is not close to max (131072) +par_max_length_len_128k 1 8293 131004 +par_max_length_len_128k 1 6662 131026 +par_max_length_len_128k 1 14215 131044 +par_max_length_len_128k 1 9266 131036 +par_max_length_len_128k 1 7013 131033 +par_max_length_len_128k 1 14807 131043 par_memfree ### test memfree - it should be killed by timeout par_memfree Free mem: 1k par_memfree parallel: Warning: This job was killed because it timed out: @@ -9,6 +135,23 @@ par_memfree parallel: Warning: parallel --memfree 1t echo Free mem: ::: 1t par_memory_leak ### Test for memory leaks par_memory_leak Of 100 runs of 1 job at least one should be bigger than a 3000 job run par_memory_leak Good: No memleak detected. +par_no_newline_compress bug #41613: --compress --line-buffer - no newline +par_no_newline_compress tagstring=--tagstring {#} compress=--compress +par_no_newline_compress 1 OK +par_no_newline_compress tagstring=--tagstring {#} compress=--compress +par_no_newline_compress 1 OK +par_no_newline_compress tagstring=--tagstring {#} compress=-k +par_no_newline_compress 1 OK +par_no_newline_compress tagstring=--tagstring {#} compress=-k +par_no_newline_compress 1 OK +par_no_newline_compress tagstring=-k compress=--compress +par_no_newline_compress OK +par_no_newline_compress tagstring=-k compress=--compress +par_no_newline_compress OK +par_no_newline_compress tagstring=-k compress=-k +par_no_newline_compress OK +par_no_newline_compress tagstring=-k compress=-k +par_no_newline_compress OK par_race_condition1 ### Test race condition on 8 CPU (my laptop) par_race_condition1 1 par_race_condition1 2 diff --git a/testsuite/wanted-results/parallel-local-3s b/testsuite/wanted-results/parallel-local-3s index 3d925fa7..64003515 100644 --- a/testsuite/wanted-results/parallel-local-3s +++ b/testsuite/wanted-results/parallel-local-3s @@ -37,8 +37,11 @@ par_delay_human_readable c par_delay_human_readable a par_delay_human_readable b par_delay_human_readable c -par_do_not_export_ENV_PARALLEL ### Do not export $ENV_PARALLEL to children -par_do_not_export_ENV_PARALLEL 1 1 60001 +par_do_not_export_PARALLEL_ENV ### Do not export $PARALLEL_ENV to children +par_do_not_export_PARALLEL_ENV Should be 0 +par_do_not_export_PARALLEL_ENV 1 0 1 +par_do_not_export_PARALLEL_ENV Should give 60k and not overflow +par_do_not_export_PARALLEL_ENV 1 1 60001 par_dryrun_timeout_ungroup bug #51039: --dry-run --timeout 1.4m -u breaks par_dryrun_timeout_ungroup 1000 2000 8893 par_exitval_signal ### Test --joblog with exitval and Test --joblog with signal -- timing dependent diff --git a/testsuite/wanted-results/parallel-local-ssh7 b/testsuite/wanted-results/parallel-local-ssh7 index a80d7dbe..d381a3f5 100644 --- a/testsuite/wanted-results/parallel-local-ssh7 +++ b/testsuite/wanted-results/parallel-local-ssh7 @@ -21,9 +21,9 @@ par_zsh_underscore (eval):1: command not found: myecho par_zsh_underscore OK if no .^^^^^^^^^^^^^^^^^^^^^^^^^ myecho par_zsh_underscore (eval):1: command not found: myecho par_zsh_underscore OK if no .^^^^^^^^^^^^^^^^^^^^^^^^^ myecho -par_zsh_underscore (eval):1: command not found: myfunc +par_zsh_underscore zsh:1: command not found: myfunc par_zsh_underscore OK if no .^^^^^^^^^^^^^^^^^^^^^^^^^ myfunc -par_zsh_underscore (eval):1: command not found: myfunc +par_zsh_underscore zsh:1: command not found: myfunc par_zsh_underscore OK if no .^^^^^^^^^^^^^^^^^^^^^^^^^ myfunc par_zsh_parset parset par_zsh_parset ### parset into array @@ -152,7 +152,7 @@ par_zsh_environment_too_big OK_bigfunc_remote par_zsh_environment_too_big OK_bigfunc_quote par_zsh_environment_too_big OK_bigfunc_quote_remote par_zsh_environment_too_big Rest should fail -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -162,7 +162,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -172,7 +172,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -182,7 +182,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -192,7 +192,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -202,7 +202,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -212,7 +212,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -222,7 +222,7 @@ par_zsh_environment_too_big env_parallel: Error: 3. Try running this in a clean par_zsh_environment_too_big env_parallel: Error: env_parallel --record-env par_zsh_environment_too_big env_parallel: Error: And then use '--env _' par_zsh_environment_too_big env_parallel: Error: For details see: man env_parallel -par_zsh_environment_too_big _which:12: argument list too long: perl +par_zsh_environment_too_big _which_PAR:12: argument list too long: perl par_zsh_environment_too_big env_parallel: Error: Your environment is too big. par_zsh_environment_too_big env_parallel: Error: You can try 3 different approaches: par_zsh_environment_too_big env_parallel: Error: 1. Run 'env_parallel --session' before you set @@ -383,13 +383,13 @@ par_sh_underscore variables in aliases work par_sh_underscore variables in aliases work par_sh_underscore variables in aliases work par_sh_underscore variables in aliases work -par_sh_underscore /bin/sh: 4: not_copied_alias: not found +par_sh_underscore /bin/sh: 3: not_copied_alias: not found par_sh_underscore error=OK par_sh_underscore aliases work par_sh_underscore aliases work -par_sh_underscore /bin/sh: 2: myecho: not found +par_sh_underscore /bin/sh: 1: myecho: not found par_sh_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ -par_sh_underscore /bin/sh: 2: myecho: not found +par_sh_underscore /bin/sh: 1: myecho: not found par_sh_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ par_sh_parset parset par_sh_parset ### parset into vars with comma @@ -551,8 +551,8 @@ par_ksh_underscore variables in aliases in and arrays in functions work par_ksh_underscore variables in aliases in and arrays in functions work par_ksh_underscore variables in aliases in and arrays in functions work par_ksh_underscore variables in aliases in and arrays in functions work -par_ksh_underscore /usr/bin/ksh: line 5: not_copied_alias: not found -par_ksh_underscore /usr/bin/ksh: line 5: not_copied_func: not found +par_ksh_underscore /usr/bin/ksh: line 4: not_copied_alias: not found +par_ksh_underscore /usr/bin/ksh: line 4: not_copied_func: not found par_ksh_underscore error=OK par_ksh_underscore error=OK par_ksh_underscore aliases in and arrays in functions work @@ -563,9 +563,9 @@ par_ksh_underscore /usr/bin/ksh: myecho: not found [No such file or directory] par_ksh_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ par_ksh_underscore /usr/bin/ksh: myecho: not found [No such file or directory] par_ksh_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ -par_ksh_underscore /usr/bin/ksh: line 2: myfunc: not found +par_ksh_underscore /usr/bin/ksh: myfunc: not found par_ksh_underscore OK if no myfunc ^^^^^^^^^^^^^^^^^ -par_ksh_underscore /usr/bin/ksh: line 2: myfunc: not found +par_ksh_underscore /usr/bin/ksh: myfunc: not found par_ksh_underscore OK if no myfunc ^^^^^^^^^^^^^^^^^ par_ksh_parset parset par_ksh_parset ### parset into array @@ -780,9 +780,9 @@ par_ksh_environment_too_big env_parallel: Error: And then use '--env _' par_ksh_environment_too_big env_parallel: Error: For details see: man env_parallel par_ksh_env_parallel_session ### Test env_parallel --session par_ksh_env_parallel_session /usr/bin/ksh: line 4: aliasbefore: not found -par_ksh_env_parallel_session /usr/bin/ksh: line 5: aliasbefore: not found -par_ksh_env_parallel_session /usr/bin/ksh: line 5: funcbefore: not found -par_ksh_env_parallel_session /usr/bin/ksh: line 5: funcbefore: not found +par_ksh_env_parallel_session /usr/bin/ksh: line 4: aliasbefore: not found +par_ksh_env_parallel_session /usr/bin/ksh: line 4: funcbefore: not found +par_ksh_env_parallel_session /usr/bin/ksh: line 4: funcbefore: not found par_ksh_env_parallel_session no_before par_ksh_env_parallel_session no_before par_ksh_env_parallel_session no_before @@ -945,13 +945,13 @@ par_dash_underscore variables in aliases work par_dash_underscore variables in aliases work par_dash_underscore variables in aliases work par_dash_underscore variables in aliases work -par_dash_underscore /bin/dash: 4: not_copied_alias: not found +par_dash_underscore /bin/dash: 3: not_copied_alias: not found par_dash_underscore error=OK par_dash_underscore aliases work par_dash_underscore aliases work -par_dash_underscore /bin/dash: 2: myecho: not found +par_dash_underscore /bin/dash: 1: myecho: not found par_dash_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ -par_dash_underscore /bin/dash: 2: myecho: not found +par_dash_underscore /bin/dash: 1: myecho: not found par_dash_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ par_dash_parset parset par_dash_parset ### parset into vars with comma @@ -1481,13 +1481,13 @@ par_ash_underscore variables in aliases work par_ash_underscore variables in aliases work par_ash_underscore variables in aliases work par_ash_underscore variables in aliases work -par_ash_underscore /bin/ash: 4: not_copied_alias: not found +par_ash_underscore /bin/ash: 3: not_copied_alias: not found par_ash_underscore error=OK par_ash_underscore aliases work par_ash_underscore aliases work -par_ash_underscore /bin/ash: 2: myecho: not found +par_ash_underscore /bin/ash: 1: myecho: not found par_ash_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ -par_ash_underscore /bin/ash: 2: myecho: not found +par_ash_underscore /bin/ash: 1: myecho: not found par_ash_underscore OK if no myecho ^^^^^^^^^^^^^^^^^ par_ash_parset parset par_ash_parset ### parset into vars with comma diff --git a/testsuite/wanted-results/parallel-local-ssh9 b/testsuite/wanted-results/parallel-local-ssh9 index efeef5bb..6d763281 100644 --- a/testsuite/wanted-results/parallel-local-ssh9 +++ b/testsuite/wanted-results/parallel-local-ssh9 @@ -7,7 +7,7 @@ par_zsh_embed code par_zsh_embed here par_zsh_embed parallel_OK par_zsh_embed env_parallel --env OK -par_zsh_embed _which:12: argument list too long: perl +par_zsh_embed _which_PAR:12: argument list too long: perl par_zsh_embed env_parallel: Error: Your environment is too big. par_zsh_embed env_parallel: Error: You can try 3 different approaches: par_zsh_embed env_parallel: Error: 1. Run 'env_parallel --session' before you set diff --git a/testsuite/wanted-results/parallel-local19 b/testsuite/wanted-results/parallel-local19 index 9afc2fdd..47dab745 100644 --- a/testsuite/wanted-results/parallel-local19 +++ b/testsuite/wanted-results/parallel-local19 @@ -105,54 +105,46 @@ echo '### Test -m' a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6 seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.} a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6 -echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 -### Test -m with 60000 args -f5e1ea298b25c5516d63061df5c56f79 - - 10 179980 1286692 -echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 -### Test -X with 60000 args -3f7c4c261957ac7186bbe97cddcf5ae9 - - 11 60000 1346682 -echo '### Test -X with 60000 args and 5 expansions' -### Test -X with 60000 args and 5 expansions - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l -17 - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l -13 - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l -11 - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l -9 - seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l -6 +echo '### Test -m with 10000 args'; seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 +### Test -m with 10000 args +dc1624c3316077d0d95803a2eb30f455 - + 2 29996 186684 +echo '### Test -X with 10000 args'; seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1 +### Test -X with 10000 args +2830a5b41659f3c0bb34a755fe5f1518 - + 2 10000 196682 +echo '### Test -X with 10000 args and 5 expansions' +### Test -X with 10000 args and 5 expansions + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l +3 + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l +2 + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l +2 + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l +2 + seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l +1 echo '### Test {.} does not repeat more than {}' ### Test {.} does not repeat more than {} - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} + seq 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6 a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12 a13.gifb13c13 a14.gifb14c14 a15.gifb15c15 - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} -a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7 -a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13 -a14.gif 15.gifb14 15c14 15 - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.} -a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6 -a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12 -a13.gifb13c13 a14.gifb14c14 a15.gifb15c15 - seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} + seq 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.} a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7 a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13 a14.gif 15.gifb14 15c14 15 echo '### Test -I with shell meta chars' ### Test -I with shell meta chars - seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l -9 - seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l -9 - seq 1 60000 | parallel -j1 -I '<' -X echo 'a' -X echo 'a>b>c>' | wc -l -9 + seq 10000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l +2 + seq 10000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l +2 + seq 10000 | parallel -j1 -I '<' -X echo 'a' -X echo 'a>b>c>' | wc -l +2 echo '### Test {.}' ### Test {.} echo a | parallel -qX echo "'"{.}"' " @@ -194,7 +186,7 @@ begin end echo '### Test -I with -X and -m' ### Test -I with -X and -m - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::' 1 1 2 1 2 2 @@ -250,7 +242,7 @@ echo '### Test -I with -X and -m' 10 8 10 9 10 10 - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::' a1 b1 a2 b1 b2 a3 b1 b2 b3 @@ -261,7 +253,7 @@ a7 b1 b2 b3 b4 b5 b6 b7 a8 b1 b2 b3 b4 b5 b6 b7 b8 a9 b1 b2 b3 b4 b5 b6 b7 b8 b9 a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 - seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::' + seq 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::' a1 b1 a2 b1 2 a3 b1 2 3