bug-autoconf
[Top][All Lists]
Advanced

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

[PATCH] Avoid spurious testsuite failures.


From: Eric Blake
Subject: [PATCH] Avoid spurious testsuite failures.
Date: Wed, 21 Jul 2010 16:15:40 -0600

* doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and
'-o -', since the former already implies stdout, while the latter
creates -.exe on cygwin.
* tests/compile.at (AC_LANG_SOURCE example)
(AC_LANG_PROGRAM example): Likewise.  Also prevent any config.site
interference.

Signed-off-by: Eric Blake <address@hidden>
---

This fixes both issues, tested on Linux and cygwin, with and
without a config.site installed.

See also http://cygwin.com/ml/cygwin/2010-07/msg00450.html

 ChangeLog         |    8 ++++++++
 doc/autoconf.texi |    4 ++--
 tests/compile.at  |   14 ++++++++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e44f78a..d435c19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-07-21  Eric Blake  <address@hidden>

+       Avoid spurious testsuite failures.
+       * doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and
+       '-o -', since the former already implies stdout, while the latter
+       creates -.exe on cygwin.
+       * tests/compile.at (AC_LANG_SOURCE example)
+       (AC_LANG_PROGRAM example): Likewise.  Also prevent any config.site
+       interference.
+
        Partially revert previous patch.
        * lib/autotest/general.m4 (AT_INIT) <serial testing>: Changing
        at_jobs here breaks output if -j2 was requested but shell is
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index c3a8714..e510354 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -8744,7 +8744,7 @@ Generating Sources
 AC_LANG([C])
 AC_LANG_CONFTEST(
    [AC_LANG_SOURCE([[const char hw[] = "Hello, World\n";]])])
-gcc -E -dD -o - conftest.c
+gcc -E -dD conftest.c
 @end example

 @noindent
@@ -8789,7 +8789,7 @@ Generating Sources
 AC_LANG_CONFTEST(
 [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
                  [[fputs (hw, stdout);]])])
-gcc -E -dD -o - conftest.c
+gcc -E -dD conftest.c
 @end example

 @noindent
diff --git a/tests/compile.at b/tests/compile.at
index e3e4e07..028f456 100644
--- a/tests/compile.at
+++ b/tests/compile.at
@@ -169,6 +169,11 @@ AT_CLEANUP

 AT_SETUP([AC_LANG_SOURCE example])

+# Set CONFIG_SITE to a nonexistent file, so that there are
+# no worries about configure output caused by sourcing a config.site.
+CONFIG_SITE=no-such-file
+export CONFIG_SITE
+
 AT_DATA([configure.ac],
 [[# Taken from autoconf.texi:Generating Sources.
 # The only change is to not fail if gcc doesn't work.
@@ -179,7 +184,7 @@ AC_DEFINE([HELLO_WORLD], ["Hello, World\n"],
 AC_LANG([C])
 AC_LANG_CONFTEST(
    [AC_LANG_SOURCE([[const char hw[] = "Hello, World\n";]])])
-gcc -E -dD -o - conftest.c || AS_EXIT([77])
+gcc -E -dD conftest.c || AS_EXIT([77])
 ]])

 AT_CHECK_AUTOCONF
@@ -210,6 +215,11 @@ AT_CLEANUP

 AT_SETUP([AC_LANG_PROGRAM example])

+# Set CONFIG_SITE to a nonexistent file, so that there are
+# no worries about configure output caused by sourcing a config.site.
+CONFIG_SITE=no-such-file
+export CONFIG_SITE
+
 AT_DATA([configure.ac],
 [[# Taken from autoconf.texi:Generating Sources.
 # The only change is to not fail if gcc doesn't work.
@@ -220,7 +230,7 @@ AC_DEFINE([HELLO_WORLD], ["Hello, World\n"],
 AC_LANG_CONFTEST(
 [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
                  [[fputs (hw, stdout);]])])
-gcc -E -dD -o - conftest.c || AS_EXIT([77])
+gcc -E -dD conftest.c || AS_EXIT([77])
 ]])

 AT_CHECK_AUTOCONF
-- 
1.7.1.1




reply via email to

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