From 6bcba83499ed4bdea774a23e6ce577d22e47c2e5 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 22 Jun 2011 01:14:59 +0200 Subject: [PATCH] parallel: Fixed -u with test. Passes testsuite. --- configure | 20 ++++++++++---------- configure.ac | 2 +- doc/release_new_version | 3 +++ src/niceload | 2 +- src/parallel | 12 +++++++++--- src/sql | 2 +- testsuite/tests-to-run/test60.sh | 5 +++-- testsuite/wanted-results/test60 | 5 ++++- 8 files changed, 32 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 4de1aeab..1def2cca 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for parallel 20110607. +# Generated by GNU Autoconf 2.68 for parallel 20110622. # # Report bugs to . # @@ -559,8 +559,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20110607' -PACKAGE_STRING='parallel 20110607' +PACKAGE_VERSION='20110622' +PACKAGE_STRING='parallel 20110622' PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_URL='' @@ -1176,7 +1176,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures parallel 20110607 to adapt to many kinds of systems. +\`configure' configures parallel 20110622 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1242,7 +1242,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20110607:";; + short | recursive ) echo "Configuration of parallel 20110622:";; esac cat <<\_ACEOF @@ -1309,7 +1309,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20110607 +parallel configure 20110622 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1326,7 +1326,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by parallel $as_me 20110607, which was +It was created by parallel $as_me 20110622, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2141,7 +2141,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20110607' + VERSION='20110622' cat >>confdefs.h <<_ACEOF @@ -2704,7 +2704,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by parallel $as_me 20110607, which was +This file was extended by parallel $as_me 20110622, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2766,7 +2766,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -parallel config.status 20110607 +parallel config.status 20110622 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index eeb10d2b..4b398b8e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([parallel], [20110607], [bug-parallel@gnu.org]) +AC_INIT([parallel], [20110622], [bug-parallel@gnu.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/release_new_version b/doc/release_new_version index 97941554..5dcf1643 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -192,6 +192,9 @@ New in this release: * Article in Linux Magazine (Spanish). Thanks to Ben Martin. http://www.linux-magazine.es/issue/67/ +* First blog post in Korean. Thanks to 민병국. + http://blog.daum.net/_blog/BlogTypeView.do?blogid=02RQ3&articleno=13380895&admin=# + * Blog post in Japanese. Thanks to Naoya Nakazawa. http://www.sssg.org/blogs/naoya/archives/2003 diff --git a/src/niceload b/src/niceload index 568013dd..88a42570 100755 --- a/src/niceload +++ b/src/niceload @@ -296,7 +296,7 @@ B(1), B(1) use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20110607; +$Global::version = 20110622; Getopt::Long::Configure("bundling","require_order"); get_options_from_array(\@ARGV) || die_usage(); if($::opt_version) { diff --git a/src/parallel b/src/parallel index ccf7b9ce..dd1bc991 100755 --- a/src/parallel +++ b/src/parallel @@ -65,15 +65,21 @@ if($::opt_nonall or $::opt_onall) { # Pass some of the options to the sub-parallels, not all of them as # -P should only go to the first, and -S should not be copied at all. my $options = + join(" ", + ((defined $::opt_P) ? "-P $::opt_P" : ""), + ((defined $::opt_u) ? "-u" : ""), + ((defined $::opt_g) ? "-g" : ""), + ); + my $suboptions = join(" ", ((defined $::opt_u) ? "-u" : ""), ((defined $::opt_g) ? "-g" : ""), ((defined @::opt_v) ? "-vv" : ""), ); ::debug("| parallel"); - open(PARALLEL,"| parallel -P $::opt_P") || die; + open(PARALLEL,"| parallel $options") || die; for my $sshlogin (values %Global::host) { - print PARALLEL "parallel $options -j1 -S ". + print PARALLEL "parallel $suboptions -j1 -S ". shell_quote_scalar($sshlogin->string())." ". shell_quote_scalar($command)." :::: @argfiles\n"; } @@ -447,7 +453,7 @@ sub get_options_from_array { sub parse_options { # Returns: N/A # Defaults: - $Global::version = 20110607; + $Global::version = 20110622; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; diff --git a/src/sql b/src/sql index 09a2f34f..30536b48 100755 --- a/src/sql +++ b/src/sql @@ -536,7 +536,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20110607; + $Global::version = 20110622; $Global::progname = 'sql'; # This must be done first as this may exec myself diff --git a/testsuite/tests-to-run/test60.sh b/testsuite/tests-to-run/test60.sh index a03e2dc0..6c2e02f2 100644 --- a/testsuite/tests-to-run/test60.sh +++ b/testsuite/tests-to-run/test60.sh @@ -11,8 +11,9 @@ seq 3 | parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{p echo '### Test --onall -u' parallel --onall -S parallel@$SERVER2,$SERVER1 -u '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort echo '### Test --nonall' -parallel --nonall -S parallel@$SERVER2,$SERVER1 'hostname' -parallel --nonall -S parallel@$SERVER2,$SERVER1 -u 'hostname;sleep 2;hostname' +parallel --nonall -k -S parallel@$SERVER2,$SERVER1 'hostname' | sort +echo '### Test --nonall -u' +parallel --nonall -S parallel@$SERVER2,$SERVER1 -vu 'sleep {#};hostname;sleep 3;hostname' echo '### Test read sshloginfile from STDIN' echo nlv.pi.dk | parallel -S - --nonall hostname echo nlv.pi.dk | parallel --sshloginfile - --nonall hostname diff --git a/testsuite/wanted-results/test60 b/testsuite/wanted-results/test60 index 75967f21..8d4b8461 100644 --- a/testsuite/wanted-results/test60 +++ b/testsuite/wanted-results/test60 @@ -58,10 +58,13 @@ ### Test --nonall nlv.pi.dk vh2.pi.dk -nlv.pi.dk +### Test --nonall -u +ssh parallel-server3 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; sleep\ 1\;hostname\;sleep\ 3\;hostname; +ssh parallel@parallel-server2 PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\; sleep\ 1\;hostname\;sleep\ 3\;hostname; vh2.pi.dk nlv.pi.dk vh2.pi.dk +nlv.pi.dk ### Test read sshloginfile from STDIN nlv.pi.dk nlv.pi.dk