From 7828edbe2c2a4a7952d0a4932979eb193c724b14 Mon Sep 17 00:00:00 2001 From: Dave Goodell Date: Tue, 28 Feb 2012 13:49:22 -0600 Subject: [PATCH] tests: fix spurious failure with Portland Compilers * tests/silent-many-generic.test (configure.ac): Be more careful in the workaround to avoid spurious failures with C++ compilers containing the string "CC" in their names; this avoids spurious failures with at least the Sun Studio C++ compiler (when named "sunCC") and the Portland Group C++ Compiler ("pgCC"). Also handle arguments with whitespace correctly in the 'am--cxx' temporary wrapper. * THANKS: Update. Co-authored-by: Stefano Lattarini Copyright-paperwork-exempt: yes --- THANKS | 1 + tests/silent-many-generic.test | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/THANKS b/THANKS index 1bc3a80..9d3c32c 100644 --- a/THANKS +++ b/THANKS @@ -71,6 +71,7 @@ Daniel Kahn Gillmor dkg@fifthhorseman.net Daniel Richard G. skunk@iskunk.org Debarshi Ray rishi@gnu.org Dave Brolley brolley@redhat.com +Dave Goodell goodell@mcs.anl.gov Dave Hart davehart@gmail.com Dave Korn dave.korn.cygwin@googlemail.com Dave Morrison dave@bnl.gov diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test index a7a0487..a3d3b81 100755 --- a/tests/silent-many-generic.test +++ b/tests/silent-many-generic.test @@ -110,17 +110,21 @@ test -n "`echo $CXX`" || AC_MSG_ERROR([C++ compiler not found], [77]) test -n "`echo $FC`" || AC_MSG_ERROR([Fortran compiler not found], [77]) test -n "`echo $F77`" || AC_MSG_ERROR([Fortran 77 compiler not found], [77]) -# The SunStudio C++ compiler is unfortunately named 'CC' (yuck!), -# and this can cause problems with our grepping checks on the -# output from make. Avoid these problems by invoking a wrapper -# script, as filtering the make output proved too fragile. +# The SunStudio C++ compiler is unfortunately named 'sunCC' (or even just +# 'CC', yuck!); similarly and the Portland group C++ compiler is named +# 'pgCC'. This can cause problems with our grepping checks on the output +# from make. Avoid these problems by invoking a wrapper script, as +# filtering the make output proved too fragile. case " $CXX " in - *' CC '*|*'/CC '*) - AC_MSG_WARN([the C++ compiler '$CXX' seems to be named 'CC']) + *'CC '*) + AC_MSG_WARN([the C++ compiler '$CXX' name ends with 'CC']) AC_MSG_WARN([it will be wrapped with the custom script 'am--cxx']) echo '#!/bin/sh' > bin/am--cxx echo 'PATH=$saved_PATH; export PATH' >> bin/am--cxx - echo "exec $CXX \${1+"\$@"}" >> bin/am--cxx + echo "case \$# in" >> bin/am--cxx + echo " 0) exec $CXX ;;" >> bin/am--cxx + echo " *) exec $CXX \"\$@\" ;;" >> bin/am--cxx + echo "esac" >> bin/am--cxx chmod a+x bin/am--cxx CXX=am--cxx esac -- 2.7.4