automake-patches
[Top][All Lists]
Advanced

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

[PATCH 7/9] Tests on silent-mode for C/Libtool made stricter.


From: Stefano Lattarini
Subject: [PATCH 7/9] Tests on silent-mode for C/Libtool made stricter.
Date: Mon, 26 Apr 2010 00:07:26 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

* tests/silent.test: Made stricter w.r.t. the grepping of the
output produced by `make'.
* tests/silent2.test: Likewise.
* tests/silent4.test: Likewise.
* tests/silent9.test: Likewise.
* tests/silent3.test: Likewise, and add a final `make distclean'
command to keep it better in sync with tests/silent{4,9}.test.
From 79fb4ca46afebe1554b1286ea6f5536c9edf3527 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sun, 25 Apr 2010 22:52:30 +0200
Subject: [PATCH 7/9] Tests on silent-mode for C/Libtool made stricter.

* tests/silent.test: Made stricter w.r.t. the grepping of the
output produced by `make'.
* tests/silent2.test: Likewise.
* tests/silent4.test: Likewise.
* tests/silent9.test: Likewise.
* tests/silent3.test: Likewise, and add a final `make distclean'
command to keep it better in sync with tests/silent{4,9}.test.
---
 ChangeLog          |    9 +++++++++
 tests/silent.test  |   12 ++----------
 tests/silent2.test |   12 ++----------
 tests/silent3.test |   15 ++++-----------
 tests/silent4.test |   15 +++------------
 tests/silent9.test |   15 +++------------
 6 files changed, 23 insertions(+), 55 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 047218d..6b99e21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-04-25  Stefano Lattarini  <address@hidden>
 
+       Tests on silent-mode for C/Libtool made stricter.
+       * tests/silent.test: Made stricter w.r.t. the grepping of the
+       output produced by `make'.
+       * tests/silent2.test: Likewise.
+       * tests/silent4.test: Likewise.
+       * tests/silent9.test: Likewise.
+       * tests/silent3.test: Likewise, and add a final `make distclean'
+       command to keep it better in sync with tests/silent{4,9}.test.
+
        Improved test silent5.test.
        * tests/silent5.test: Remove by hand all generated C files after
        non-verbose builds, to ensure the following builds are clean.
diff --git a/tests/silent.test b/tests/silent.test
index 62fd786..c91115c 100755
--- a/tests/silent.test
+++ b/tests/silent.test
@@ -63,8 +63,7 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
 grep 'CC    .*foo\.' stdout
 grep 'CC .*bar\.' stdout
@@ -80,13 +79,6 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && Exit 1
 
 :
diff --git a/tests/silent2.test b/tests/silent2.test
index de66152..da22718 100755
--- a/tests/silent2.test
+++ b/tests/silent2.test
@@ -65,8 +65,7 @@ $AUTOCONF
 ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
 grep 'CC .*foo\.' stdout
 grep 'CC .*bar\.' stdout
@@ -82,13 +81,6 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && Exit 1
 
 :
diff --git a/tests/silent3.test b/tests/silent3.test
index ca783c8..9fc3095 100755
--- a/tests/silent3.test
+++ b/tests/silent3.test
@@ -66,8 +66,7 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
@@ -83,13 +82,7 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
-:
+$MAKE distclean
diff --git a/tests/silent4.test b/tests/silent4.test
index 7785709..4433e45 100755
--- a/tests/silent4.test
+++ b/tests/silent4.test
@@ -67,8 +67,7 @@ $AUTOCONF
 ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
@@ -84,15 +83,7 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
 $MAKE distclean
-
-:
diff --git a/tests/silent9.test b/tests/silent9.test
index e246354..c78f9e4 100755
--- a/tests/silent9.test
+++ b/tests/silent9.test
@@ -66,8 +66,7 @@ $AUTOCONF
 ./configure --disable-dependency-tracking --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
 grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
@@ -83,15 +82,7 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
 $MAKE distclean
-
-:
-- 
1.6.5


reply via email to

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