automake-patches
[Top][All Lists]
Advanced

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

[PATCH 4/5] Tests defs: avoid some useless subshells.


From: Stefano Lattarini
Subject: [PATCH 4/5] Tests defs: avoid some useless subshells.
Date: Mon, 15 Nov 2010 18:26:05 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* tests/defs: In the loop on "$required" tools: avoid subshells
where not neded.
---
 ChangeLog  |    4 ++++
 tests/defs |   30 +++++++++++++++---------------
 2 files changed, 19 insertions(+), 15 deletions(-)
From ccf42890cb5a5cc89e62593987f9a1b7c3895480 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 12 Nov 2010 17:12:05 +0100
Subject: [PATCH 4/5] Tests defs: avoid some useless subshells.

* tests/defs: In the loop on "$required" tools: avoid subshells
where not neded.
---
 ChangeLog  |    4 ++++
 tests/defs |   30 +++++++++++++++---------------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5efbcf2..c0f4e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-11-12  Stefano Lattarini  <address@hidden>
 
+       Tests defs: avoid some useless subshells.
+       * tests/defs: In the loop on "$required" tools: avoid subshells
+       where not neded.
+
        Tests defs: some cleanup and minor fixes.
        * tests/defs: Exit with status 99 (hard error) rather than
        1 (failure) on unexpected/internal errors, or when a signal
diff --git a/tests/defs b/tests/defs
index 9ff9b5d..b67a695 100644
--- a/tests/defs
+++ b/tests/defs
@@ -160,18 +160,18 @@ do
       YACC='bison -y'
       export YACC
       echo "$me: running bison --version"
-      ( bison --version ) || exit 77
+      bison --version || exit 77
       ;;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
-      ( bzip2 --help ) || exit 77
+      bzip2 --help || exit 77
       ;;
     cl)
       CC=cl
       export CC
       echo "$me: running $CC -?"
-      ( $CC -? ) || exit 77
+      $CC -? || exit 77
       ;;
     etags)
       # Exuberant Ctags will create a TAGS file even
@@ -179,7 +179,7 @@ do
       # does not have such problem.)  Use -o /dev/null
       # to make sure we do not pollute the tests/ directory.
       echo "$me: running etags --version -o /dev/null"
-      ( etags --version -o /dev/null ) || exit 77
+      etags --version -o /dev/null || exit 77
       ;;
     GNUmake)
       # Use --version AND -v, because SGI Make doesn't fail on --version.
@@ -196,21 +196,21 @@ do
       CC=gcc
       export CC
       echo "$me: running $CC --version"
-      ( $CC --version ) || exit 77
+      $CC --version || exit 77
       ;;
     gcj)
       GCJ=gcj
       export GCJ
       echo "$me: running $GCJ --version"
-      ( $GCJ --version ) || exit 77
+      $GCJ --version || exit 77
       echo "$me: running $GCJ -v"
-      ( $GCJ -v ) || exit 77
+      $GCJ -v || exit 77
       ;;
     g++)
       CXX=g++
       export CXX
       echo "$me: running $CXX --version"
-      ( $CXX --version ) || exit 77
+      $CXX --version || exit 77
       ;;
     icc)
       CC=icc
@@ -220,16 +220,16 @@ do
       # it will try link *nothing* and complain it cannot find
       # main(); funny).  Use -help so it does not try linking anything.
       echo "$me: running $CC -V -help"
-      ( $CC -V -help ) || exit 77
+      $CC -V -help || exit 77
       ;;
     makedepend)
       echo "$me: running makedepend -f-"
-      ( makedepend -f- ) || exit 77
+      makedepend -f- || exit 77
       ;;
     makeinfo-html)
       # Make sure makeinfo understands --html.
       echo "$me: running makeinfo --html --version"
-      ( makeinfo --html --version ) || exit 77
+      makeinfo --html --version || exit 77
       ;;
     non-root)
       # Skip this test case if the user is root.
@@ -253,7 +253,7 @@ do
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
-      ( python -V ) || exit 77
+      python -V || exit 77
       ;;
     ro-dir)
       # Skip this test case if read-only directories aren't supported
@@ -285,7 +285,7 @@ do
       # the program on the runtest command-line. This requires
       # DejaGnu 1.4.3 or later.
       echo "$me: running runtest SOMEPROGRAM=someprogram --version"
-      (runtest SOMEPROGRAM=someprogram --version) || exit 77
+      runtest SOMEPROGRAM=someprogram --version || exit 77
       ;;
     tex)
       # No all versions of Tex support `--version', so we use
@@ -297,12 +297,12 @@ do
     texi2dvi-o)
       # Texi2dvi supports `-o' since Texinfo 4.1.
       echo "$me: running texi2dvi -o /dev/null --version"
-      ( texi2dvi -o /dev/null --version ) || exit 77
+      texi2dvi -o /dev/null --version || exit 77
       ;;
     *)
       # Generic case: the tool must support --version.
       echo "$me: running $tool --version"
-      ( $tool --version ) || exit 77
+      $tool --version || exit 77
       ;;
   esac
 done
-- 
1.7.1


reply via email to

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