Now that more tests can be run with non-GNU compilers, some spurious failures have started to come up in the `silent*.test' tests. This patch fixes the first of them, caused by the unusual name "sunCC" or "CC" for the C++ compiler of SunStudio 12.
Regards, Stefano -*-*-*- Fix `silent*.test' for C++ compilers with "weird" names. * tests/silentcxx.test: Do not fail if the string `CC ' is found in make output when in verbose mode, since there could be legitimate C++ compilers containing `CC' in their name (e.g. Sun Studio's "sunCC"). Instead, use a stricter regexps when grepping make output. * tests/silent5.test: Likewise.
From f452df6a1106c03149b23a1d12576eaa4f146470 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 2 Jul 2010 12:41:29 +0200 Subject: [PATCH 06/14] Fix `silent*.test' for C++ compilers with "weird" names. * tests/silentcxx.test: Do not fail if the string `CC ' is found in make output when in verbose mode, since there could be legitimate C++ compilers containing `CC' in their name (e.g. Sun Studio's "sunCC"). Instead, use a stricter regexps when grepping make output. * tests/silent5.test: Likewise. --- ChangeLog | 10 ++++++++++ tests/silent5.test | 7 ++++++- tests/silentcxx.test | 7 ++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0e3ff6..29d0159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,14 @@ 2010-07-02 Stefano Lattarini <stefano.lattar...@gmail.com> + + Fix `silent*.test' for C++ compilers with "weird" names. + * tests/silentcxx.test: Do not fail if the string `CC ' is found + in make output when in verbose mode, since there could be + legitimate C++ compilers containing `CC' in their name (e.g. Sun + Studio's "sunCC"). Instead, use a stricter regexps when grepping + make output. + * tests/silent5.test: Likewise. + +2010-07-02 Stefano Lattarini <stefano.lattar...@gmail.com> Ralf Wildenhues <ralf.wildenh...@gmx.de> New requirement "c++" for tests using a C++ compiler. diff --git a/tests/silent5.test b/tests/silent5.test index 1c350e6..ff3015a 100755 --- a/tests/silent5.test +++ b/tests/silent5.test @@ -25,6 +25,8 @@ required='cc c++ gfortran flex bison' set -e +tab=' ' + # Avoids too much code duplication. do_and_check_silent_build () { @@ -80,7 +82,10 @@ do_and_check_verbose_build () grep ' -c ' stdout grep ' -o ' stdout - $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1 + # The complex regexp is needed to cater for (C++) compilers with a + # "weird" name, such as Sun Stdio's "sunCC" compiler. + # And yes, they have already caused spurious failures in practice. + $EGREP "(^| |$tab)(CC|CXX|FC|F77LD)($| |$tab)" stdout && Exit 1 if $rebuild; then :; else grep 'ylwrap ' stdout diff --git a/tests/silentcxx.test b/tests/silentcxx.test index 72e409f..8dc5c94 100755 --- a/tests/silentcxx.test +++ b/tests/silentcxx.test @@ -21,6 +21,8 @@ required='c++' set -e +tab=' ' + mkdir sub cat >>configure.in <<'EOF' @@ -94,7 +96,10 @@ do grep ' -c ' stdout grep ' -o ' stdout - $EGREP '(CC|CXX|LD) ' stdout && Exit 1 + # The complex regexp is needed to cater for (C++) compilers with a + # "weird" name, such as Sun Stdio's "sunCC" compiler. + # And yes, they have already caused spurious failures in practice. + $EGREP "(^| |$tab)(CC|CXX|LD)($| |$tab)" stdout && Exit 1 # Ensure a clean reconfiguration/rebuild. $MAKE clean -- 1.6.5