automake-patches
[Top][All Lists]
Advanced

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

[FYI] {maint} check-cc-no-c-o: avoid a spurious failure


From: Stefano Lattarini
Subject: [FYI] {maint} check-cc-no-c-o: avoid a spurious failure
Date: Tue, 14 May 2013 13:19:04 +0200

* t/am-prog-cc-c-o.sh: In this test, by relying on the knowledge
that we are running under the aegis of the 'check-cc-no-c-o'
maintainer-specific target, knowledge given us by ...
* t/Makefile.in (check-cc-no-c-o) : ... the new environment
variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O', set to a value
of "yes" by this rule.
* t/ax/test-defs.in: Initialize the new variable to "no" by
default, and add an explanatory comment.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/Makefile.inc      | 1 +
 t/am-prog-cc-c-o.sh | 6 +++++-
 t/ax/test-defs.in   | 5 +++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/t/Makefile.inc b/t/Makefile.inc
index 18a57c2..800b66c 100644
--- a/t/Makefile.inc
+++ b/t/Makefile.inc
@@ -235,6 +235,7 @@ check-no-trailing-backslash-in-recipes:
 # long discussion about automake bug#13378.
 check-cc-no-c-o:
        $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes \
          CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o' \
          GNU_CC='$(abs_top_builddir)/%D%/ax/cc-no-c-o'
 .PHONY: check-cc-no-c-o
diff --git a/t/am-prog-cc-c-o.sh b/t/am-prog-cc-c-o.sh
index 549cdcc..920a0dc 100755
--- a/t/am-prog-cc-c-o.sh
+++ b/t/am-prog-cc-c-o.sh
@@ -56,7 +56,11 @@ $AUTOMAKE --add-missing
 
 ./configure >stdout || { cat stdout; exit 1; }
 cat stdout
-$EGREP 'understands? -c and -o together.* yes$' stdout
+if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then
+  $EGREP 'understands? -c and -o together.* no$' stdout
+else
+  $EGREP 'understands? -c and -o together.* yes$' stdout
+fi
 # No repeated checks please.
 test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
 $MAKE
diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in
index 1083743..7bf4342 100644
--- a/t/ax/test-defs.in
+++ b/t/ax/test-defs.in
@@ -76,6 +76,11 @@ PATH_SEPARATOR='@PATH_SEPARATOR@'
 host_alias=${host_alias-'@host_alias@'}; export host_alias
 build_alias=${build_alias-'@build_alias@'}; export build_alias
 
+# Whether the testsuite is being run by faking the presence of a C
+# compiler that doesn't grasp the '-c' and '-o' flags together.  By
+# default, of course, it isn't.
+: "${AM_TESTSUITE_SIMULATING_NO_CC_C_O:=no}"
+
 # A concurrency-safe "mkdir -p" implementation.
 MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}
 
-- 
1.8.3.rc2




reply via email to

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