autoconf-patches
[Top][All Lists]
Advanced

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

FYI: 12-test-autoconf-first.patch


From: Akim Demaille
Subject: FYI: 12-test-autoconf-first.patch
Date: 31 Oct 2000 09:45:43 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

This is to be added to tests/README.


* Order of the tests
It is extremely important to pay attention to the order of the tests.
There are basically two philosophies: (i) test earlier the most
critical features (hence hurried users will at least check those), or
(ii) test earlier the primitives.

For having tried both, I definitely recommend (ii).  In practice users
will run the whole test suite even if it's long.  And if they don't,
there will be enough other users who will do the job.

But also in practice some problems in the core of project can be
responsible for an incredible number of failures.  Then the problems
at the origin will be hidden by the consequences.  If dependencies are
properly ordered in the test suite (test features which depend upon
other features *after* having checked the latter), basically you'll
just have to pay attention to the first failures.  BTW, it also makes
`./testsuite -e' much more useful.


Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * tests/tools.at: Check autoconf before autoupdate and autoheader
        since they use it.

Index: tests/tools.at
--- tests/tools.at Thu, 26 Oct 2000 21:03:04 +0200 akim (ace/b/30_tools.m4 1.17 
644)
+++ tests/tools.at Tue, 31 Oct 2000 02:19:31 +0100 akim (ace/b/30_tools.m4 1.17 
644)
@@ -70,6 +70,112 @@



+## ------------------ ##
+## autoconf --trace.  ##
+## ------------------ ##
+
+AT_SETUP(autoconf --trace)
+
+AT_DATA(configure.in,
+[[define(active, ACTIVE)
+AC_DEFUN(TRACE1, [TRACE2(m4_shift($@))])
+AC_DEFUN(TRACE2, [[$2], $1])
+TRACE1(foo, bar, baz)
+TRACE1(foo, AC_TRACE1(bar, baz))
+TRACE1(foo, active, baz)
+TRACE1(foo, [active], TRACE1(active, [active]))
+]])
+
+# Several --traces.
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
+[[configure.in:4:TRACE1:foo:bar:baz
+configure.in:4:TRACE2:bar:baz
+configure.in:5:TRACE1:foo:AC_TRACE1(bar, baz)
+configure.in:5:TRACE2:AC_TRACE1(bar, baz)
+configure.in:6:TRACE1:foo:ACTIVE:baz
+configure.in:6:TRACE2:ACTIVE:baz
+configure.in:7:TRACE1:ACTIVE:active
+configure.in:7:TRACE2:active
+configure.in:7:TRACE1:foo:active::ACTIVE
+configure.in:7:TRACE2:active::ACTIVE
+]])
+
+# Several line requests.
+AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
+[$1], [$2], [$3].']], 0,
+[[
+[foo], [bar], [baz].
+
+[foo], [AC_TRACE1(bar, baz)], [].
+
+[foo], [ACTIVE], [baz].
+
+[ACTIVE], [active], [].
+
+[foo], [active], [].
+]])
+
+# address@hidden
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
+[[[bar])===([baz]
+[AC_TRACE1(bar, baz)]
+[ACTIVE])===([baz]
+[active]
+[active])===([])===([ACTIVE]
+]])
+
+AT_CLEANUP
+
+
+
+
+## ----------------------------------------------- ##
+## autoconf's ability to catch unexpanded macros.  ##
+## ----------------------------------------------- ##
+
+AT_SETUP(unexpanded macros)
+
+AT_DATA([configure.in],
+[[AC_PLAIN_SCRIPT()dnl
+AC_THIS_IS_PROBABLY_NOT_DEFINED
+# AC_THIS_IS_A_COMMENT so just shut up.
+It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
+]])
+
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
+[[configure.in:2: error: undefined macro: AC_THIS_IS_PROBABLY_NOT_DEFINED
+configure:3: error: undefined macro: AC_OUTPUT
+]])
+
+AT_CLEANUP(configure)
+
+
+
+
+
+## ---------------------------- ##
+## autoconf's AWK portability.  ##
+## ---------------------------- ##
+
+AT_SETUP(AWK portability)
+
+AT_DATA([configure.in],
+[[AC_INIT
+]])
+
+if (gawk --version) >/dev/null 2>&1; then
+  # Generation of the script.
+  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
+           [], [])
+  # Tracing.
+  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t 
AC_INIT], 0,
+           ignore, [])
+fi
+
+AT_CLEANUP(configure)
+
+
+
 ## ------------ ##
 ## autoheader.  ##
 ## ------------ ##
@@ -237,109 +343,3 @@
          1, [], [ignore])

 AT_CLEANUP
-
-
-
-## ------------------ ##
-## autoconf --trace.  ##
-## ------------------ ##
-
-AT_SETUP(autoconf --trace)
-
-AT_DATA(configure.in,
-[[define(active, ACTIVE)
-AC_DEFUN(TRACE1, [TRACE2(m4_shift($@))])
-AC_DEFUN(TRACE2, [[$2], $1])
-TRACE1(foo, bar, baz)
-TRACE1(foo, AC_TRACE1(bar, baz))
-TRACE1(foo, active, baz)
-TRACE1(foo, [active], TRACE1(active, [active]))
-]])
-
-# Several --traces.
-AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
-[[configure.in:4:TRACE1:foo:bar:baz
-configure.in:4:TRACE2:bar:baz
-configure.in:5:TRACE1:foo:AC_TRACE1(bar, baz)
-configure.in:5:TRACE2:AC_TRACE1(bar, baz)
-configure.in:6:TRACE1:foo:ACTIVE:baz
-configure.in:6:TRACE2:ACTIVE:baz
-configure.in:7:TRACE1:ACTIVE:active
-configure.in:7:TRACE2:active
-configure.in:7:TRACE1:foo:active::ACTIVE
-configure.in:7:TRACE2:active::ACTIVE
-]])
-
-# Several line requests.
-AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
-[$1], [$2], [$3].']], 0,
-[[
-[foo], [bar], [baz].
-
-[foo], [AC_TRACE1(bar, baz)], [].
-
-[foo], [ACTIVE], [baz].
-
-[ACTIVE], [active], [].
-
-[foo], [active], [].
-]])
-
-# address@hidden
-AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
-[[[bar])===([baz]
-[AC_TRACE1(bar, baz)]
-[ACTIVE])===([baz]
-[active]
-[active])===([])===([ACTIVE]
-]])
-
-AT_CLEANUP
-
-
-
-
-## ----------------------------------------------- ##
-## autoconf's ability to catch unexpanded macros.  ##
-## ----------------------------------------------- ##
-
-AT_SETUP(unexpanded macros)
-
-AT_DATA([configure.in],
-[[AC_PLAIN_SCRIPT()dnl
-AC_THIS_IS_PROBABLY_NOT_DEFINED
-# AC_THIS_IS_A_COMMENT so just shut up.
-It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
-]])
-
-AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
-[[configure.in:2: error: undefined macro: AC_THIS_IS_PROBABLY_NOT_DEFINED
-configure:3: error: undefined macro: AC_OUTPUT
-]])
-
-AT_CLEANUP(configure)
-
-
-
-
-
-## ---------------------------- ##
-## autoconf's AWK portability.  ##
-## ---------------------------- ##
-
-AT_SETUP(AWK portability)
-
-AT_DATA([configure.in],
-[[AC_INIT
-]])
-
-if (gawk --version) >/dev/null 2>&1; then
-  # Generation of the script.
-  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
-           [], [])
-  # Tracing.
-  AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t 
AC_INIT], 0,
-           ignore, [])
-fi
-
-AT_CLEANUP(configure)



reply via email to

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