2010-06-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+ 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.
./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
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
:
./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
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
:
./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
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
:
./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
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
./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
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