automake-patches
[Top][All Lists]
Advanced

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

Alternatives for check8.test...


From: Peter Rosin
Subject: Alternatives for check8.test...
Date: Thu, 02 Feb 2012 20:16:55 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

Hi!

When I run the testsuite with CC="cl -nologo" in the environment,
make -e in check8.test clobbers the rewritten CC (AM_PROG_CC_C_O
rewrites CC, remember?) causing the test to fail.

I have two alternativ patches for this, one that makes the test
skip in this situation and one that makes it pass.  I don't know
which you consider best, so I have included both version...

Any of them ok for maint?

Cheers,
Peter

>From 795056d7485655b66fa8cfea61cd7d00419fa3b7 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Thu, 2 Feb 2012 19:49:07 +0100
Subject: [PATCH] tests: skip when "make -e" clobbers the modified $CC

* tests/check8.test: If $CC has been modified, it must have been
AM_PROG_CC_C_O that was responsible, which will cause the test to
fail since it is using subdir-objects.  Skip the test instead.
---
 tests/check8.test |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/check8.test b/tests/check8.test
index a9e5730..5bd7e03 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -65,6 +65,15 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
+
+# When $CC is a losing compiler, needing help by the compile
+# script, $MAKE -e below destroys the modified $CC and brings
+# in the raw losing compiler.
+makecc=`sed -n -e 's/^CC = //p' < Makefile`
+if test -n "$CC" && test "x$CC" != "x$makecc"; then
+  skip_ "compiler can't handle subdir-objects"
+fi
+
 AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
   { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
-- 
1.7.5.1


>From 68d5f57931d82904f893d98c8528dfd3f0b6c2de Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Thu, 2 Feb 2012 19:55:32 +0100
Subject: [PATCH] tests: prevent "make -e" from clobbering the modified $CC

* tests/check8.test: If $CC has been modified, if must have been
AM_PROG_CC_C_O that was responsible, which will cause the test to
fail if "make -e" is left to clobber the modified $CC.  So,
adjust $CC to the value desired by AM_PROG_CC_C_O before calling
"make -e".
---
 tests/check8.test |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/check8.test b/tests/check8.test
index a9e5730..e0cc272 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -65,6 +65,16 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
+
+# When $CC is a losing compiler, needing help by the compile
+# script, $MAKE -e below destroys the modified $CC and brings
+# in the raw losing compiler.  Restore $CC to work around the
+# $MAKE -e nastiness.
+makecc=`sed -n -e 's/^CC = //p' < Makefile`
+if test -n "$CC" && test "x$CC" != "x$makecc"; then
+  CC=$makecc
+fi
+
 AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
   { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
-- 
1.7.5.1




reply via email to

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