autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stop `set -v'ing


From: Noah Misch
Subject: Stop `set -v'ing
Date: Sat, 23 Oct 2004 22:17:17 -0700
User-agent: Mutt/1.5.6i

In trace mode, Autotest does a `set -vx' before each command.  Most of the time
the `-v' is a no-op since Autotest executes commands with a form like `( set
-vx; command )', and as such the shell has already parsed up to the closing
parenthesis.  It is not so when the command contains a command substitution:

$ bash -c '(set -vx; echo `echo foo`)' >/dev/null
echo foo
++ echo foo
+ echo foo

The unadorned `echo foo' stemming from `-v' remains in stderr and creates
spurious test failures.  I believe no test command in the Autoconf contains a
command substitution, but other Autotest users may hit this.

Since `-v' appears bistably meaningless and harmful (with Bash, anyway), shall
we simply remove it?  This patch applies to HEAD.

2004-10-23  Noah Misch  <address@hidden>

        * lib/autotest/general.m4 [--trace] (AT_INIT): Do not `set -v'.

diff -X dontdiff -urp ac-clean/lib/autotest/general.m4 
ac-nodashv/lib/autotest/general.m4
--- ac-clean/lib/autotest/general.m4    Sat Oct 23 06:41:37 2004
+++ ac-nodashv/lib/autotest/general.m4  Sat Oct 23 16:56:28 2004
@@ -272,7 +272,7 @@ do
        ;;
 
     --trace | -x )
-       at_traceon='set -vx'; at_traceoff='set +vx'
+       at_traceon='set -x'; at_traceoff='set +x'
        ;;
 
     [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]