]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Test suite: instead of using a full list of the AC macros and an
authorAkim Demaille <akim@epita.fr>
Wed, 1 Mar 2000 08:22:40 +0000 (08:22 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 1 Mar 2000 08:22:40 +0000 (08:22 +0000)
AT macro with selects which are the AC macros to test, just
produce the list of the AC macros we want to test.

* tests/atspecific.m4 (TEST_MACRO): Removed.
* tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
selection TEST_MACRO used to do.
(macros.m4): Use it.  Use AT_TEST_MACRO, not TEST_MACRO.  Check
also AU macros.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/atspecific.m4

index 184a63cc9772e7fda5d775b2ce19ecad22b8667f..ff293e092f4510ffc9f0e1073c725f4aaa62c9ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2000-03-01  Akim Demaille  <akim@epita.fr>
+
+       Test suite: instead of using a full list of the AC macros and an
+       AT macro with selects which are the AC macros to test, just
+       produce the list of the AC macros we want to test.
+
+       * tests/atspecific.m4 (TEST_MACRO): Removed.
+       * tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
+       selection TEST_MACRO used to do.
+       (macros.m4): Use it.  Use AT_TEST_MACRO, not TEST_MACRO.  Check
+       also AU macros.
+
 2000-03-01  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi: Tune the use of quotes, add missing
index 885f2b70564e60868378c4973bf419c3b0ef0d01..dbb186cf94a41f491500953fb813b5af500a85d1 100644 (file)
@@ -40,10 +40,50 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
        chmod +x $@-tmp
        mv $@-tmp $@
 
+
+
+# EGREP_EXCLUDE
+# -------------
+# The test `syntax.m4' tries to run all the macros of Autoconf to check
+# for syntax problems, etc.  Not all the macros can be run without argument,
+# and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
+# the macros we don't want to test in syntax.m4.
+#
+# - AC_CHECK decls, files, funcs, members, types, headers
+#   Already performed in the semantical tests.
+# - AC_CONFIG
+#   They fail when the source does not exist.
+# - AC_INIT
+#   AC_INIT includes all the AC_INIT macros.  Note that there is an
+#   infinite m4 recursion if AC_INIT it used twice.
+# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
+#   are used in AC_PROG_CC etc.
+# - AC_PATH_PROGS?
+#   They produce `= val' because $1 is empty.
+# - AC_TRY
+#   Used in many places.
+# - _AC_
+#   Internal macros are used elsewhere.
+EGREP_EXCLUDE = egrep -v \
+  -e '^AC_ARG_VAR$$' \
+  -e '^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|SIZEOF|TYPE)S?$$' \
+  -e '^AC_CHECK_PROGS$$' \
+  -e '^AC_CONFIG' \
+  -e '^AC_INIT' \
+  -e '^AC_LINKER_OPTION$$' \
+  -e '^AC_LINK_FILES$$' \
+  -e '^AC_LIST_MEMBER_OF$$' \
+  -e '^AC_PATH_(TOOL|PROG)S?$$' \
+  -e '^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$' \
+  -e '^AC_REPLACE_FUNCS$$' \
+  -e '^AC_SEARCH_LIBS$$' \
+  -e '^AC_TRY' \
+  -e '_AC_'
+
 macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
        cat $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
-         sed -ne 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
-         sort >defuns
+         sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
+         sort | uniq | $(EGREP_EXCLUDE) >defuns
 # Get the list of macros that are required: there is little interest
 # in testing them since they will be run but the guy who requires
 # them.
@@ -52,7 +92,7 @@ macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Make
          sort | uniq >requires
        for macro in `cat defuns`; do \
          if fgrep "$$macro" requires >/dev/null 2>&1; then :; else \
-           echo "TEST_MACRO([$$macro])" >>$@-t; \
+           echo "AT_TEST_MACRO([$$macro])" >>$@-t; \
          fi; \
        done
        rm defuns requires
index 01218f84e9b95294ecf624319ed9bbd92a474c4b..f4a22e6165eb2f9afead0aa48259d319065aa408 100644 (file)
@@ -73,6 +73,31 @@ EXTRA_DIST = atgeneral.m4 atspecific.m4 suite.m4 macros.m4 actest.m4 $(SUITE)
 
 PERL = perl
 
+# EGREP_EXCLUDE
+# -------------
+# The test `syntax.m4' tries to run all the macros of Autoconf to check
+# for syntax problems, etc.  Not all the macros can be run without argument,
+# and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
+# the macros we don't want to test in syntax.m4.
+#
+# - AC_CHECK decls, files, funcs, members, types, headers
+#   Already performed in the semantical tests.
+# - AC_CONFIG
+#   They fail when the source does not exist.
+# - AC_INIT
+#   AC_INIT includes all the AC_INIT macros.  Note that there is an
+#   infinite m4 recursion if AC_INIT it used twice.
+# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
+#   are used in AC_PROG_CC etc.
+# - AC_PATH_PROGS?
+#   They produce `= val' because $1 is empty.
+# - AC_TRY
+#   Used in many places.
+# - _AC_
+#   Internal macros are used elsewhere.
+EGREP_EXCLUDE = egrep -v   -e '^AC_ARG_VAR$$'   -e '^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|SIZEOF|TYPE)S?$$'   -e '^AC_CHECK_PROGS$$'   -e '^AC_CONFIG'   -e '^AC_INIT'   -e '^AC_LINKER_OPTION$$'   -e '^AC_LINK_FILES$$'   -e '^AC_LIST_MEMBER_OF$$'   -e '^AC_PATH_(TOOL|PROG)S?$$'   -e '^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$'   -e '^AC_REPLACE_FUNCS$$'   -e '^AC_SEARCH_LIBS$$'   -e '^AC_TRY'   -e '_AC_'
+
+
 CLEANFILES = debug-*.sh macro configure configure.in config.status config.cache config.log config.h.in config.h
 
 DISTCLEANFILES = atconfig testsuite
@@ -201,8 +226,8 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
 
 macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
        cat $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
-         sed -ne 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
-         sort >defuns
+         sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
+         sort | uniq | $(EGREP_EXCLUDE) >defuns
 # Get the list of macros that are required: there is little interest
 # in testing them since they will be run but the guy who requires
 # them.
@@ -211,7 +236,7 @@ macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Make
          sort | uniq >requires
        for macro in `cat defuns`; do \
          if fgrep "$$macro" requires >/dev/null 2>&1; then :; else \
-           echo "TEST_MACRO([$$macro])" >>$@-t; \
+           echo "AT_TEST_MACRO([$$macro])" >>$@-t; \
          fi; \
        done
        rm defuns requires
index 9e01c74a12a4ae87b8613662ff290b5906991b17..02c4bf5f2331634dc993269a640f9722b2d09b64 100644 (file)
@@ -131,47 +131,6 @@ AT_CLEANUP(configure config.status config.log config.cache config.hin config.h e
 
 
 
-# TEST_MACRO(NAME-OF-THE-MACRO)
-# -----------------------------
-# Run AT_TEST_MACRO(NAME-OF-THE-MACRO) on selected macros only.
-# There are macros which require arguments.  We cannot run them without.
-# Below are some macros directly used with other macros.  It is
-# therefore useless to test them several times.
-# - AC_CHECK decls, files, funcs, members, types, headers
-#   Already performed in the semantical tests.
-# - AC_CONFIG
-#   They fail when the source does not exist.
-# - AC_INIT
-#   AC_INIT includes all the AC_INIT macros.  Note that there is an
-#   infinite m4 recursion if AC_INIT it used twice.
-# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
-#   are used in AC_PROG_CC etc.
-# - AC_PATH_PROGS?
-#   They produce `= val' because $1 is empty.
-# - AC_TRY
-#   Used in many places.
-# - _AC_
-#   Internal macros are used elsewhere.
-AT_DEFINE(TEST_MACRO,
-[m4_match([$1],
-         [^AC_ARG_VAR$],,
-         [^AC_CHECK_\(DECL\|FILE\|FUNC\|HEADER\|MEMBER\|SIZEOF\|TYPE\)S?$],,
-         [^AC_CHECK_PROGS$],,
-         [^AC_CONFIG],,
-         [^AC_INIT],,
-         [^AC_LINKER_OPTION$],,
-         [^AC_LINK_FILES$],,
-         [^AC_LIST_MEMBER_OF$],,
-         [^AC_PATH_\(TOOL\|PROG\)S?$],,
-         [^AC_PROG_\(CC\|CXX\|F77\)_\(GNU\|WORKS\)$],,
-         [^AC_REPLACE_FUNCS$],,
-         [^AC_SEARCH_LIBS$],,
-         [^AC_TRY],,
-         [^_AC_],,
-
-         [AT_TEST_MACRO([$1])])])
-
-
 # AT_CHECK_DEFINES(CONTENT)
 # -------------------------
 # Verify that config.h, once stripped is CONTENT.