summaryrefslogtreecommitdiff
path: root/t/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 't/Makefile.inc')
-rw-r--r--t/Makefile.inc153
1 files changed, 94 insertions, 59 deletions
diff --git a/t/Makefile.inc b/t/Makefile.inc
index 6ced9266b..15f0a523b 100644
--- a/t/Makefile.inc
+++ b/t/Makefile.inc
@@ -35,9 +35,71 @@ AM_TAP_LOG_DRIVER_FLAGS = --merge
EXTRA_DIST += %D%/README %D%/ax/is %D%/ax/is_newest %D%/ax/deltree.pl
-## Will be updated later.
-TESTS =
+# Hand-written tests for stuff in 'contrib/'.
+include $(srcdir)/contrib/%D%/Makefile.inc
+# All tests, both hand-written and autogenerated.
+# IMPORTANT: This assumes that the autogenerated tests are placed
+# in the $(srcdir) as well!
+all_TESTS = \
+ $(wildcard $(srcdir)/%D%/*.sh) \
+ $(wildcard $(srcdir)/%D%/*.tap) \
+ $(wildcard $(srcdir)/%D%/pm/*.pl)
+
+# This is to ensure longer-running tests will be run earlier, which is
+# useful when running the testsuite in parallel on multicore machines.
+# Here too we assume that the autogenerated tests are placed in $(srcdir).
+long_running_TESTS = \
+ $(srcdir)/%D%/dist-many.sh \
+ $(srcdir)/%D%/parallel-tests-many.sh \
+ $(srcdir)/%D%/add-missing.tap \
+ $(srcdir)/%D%/instspc.tap \
+ $(wildcard $(srcdir)/%D%/depcomp-*.tap) \
+ $(wildcard $(srcdir)/%D%/*libtool*.sh) \
+ $(wildcard $(srcdir)/%D%/lt*.sh) \
+ $(wildcard $(srcdir)/%D%/remake*.sh)
+
+TESTS = \
+ $(long_running_TESTS) \
+ $(filter-out $(long_running_TESTS), $(all_TESTS)) \
+ $(contrib_TESTS)
+
+EXTRA_DIST += $(TESTS)
+
+# FIXME: this "expected failures" are in truth an hack used to
+# FIXME: to verify that some incorrect usages of our perl libraries
+# FIXME: raise an error. We should find a cleaner way to check that.
+perl_fake_XFAIL_TESTS = \
+ %D%/pm/Cond2.pl \
+ %D%/pm/Cond3.pl \
+ %D%/pm/DisjCon2.pl \
+ %D%/pm/DisjCon3.pl \
+ %D%/pm/Version2.pl \
+ %D%/pm/Version3.pl
+
+XFAIL_TESTS = \
+ %D%/all.sh \
+ %D%/auxdir-pr19311.sh \
+ %D%/override-suggest-local.sh \
+ %D%/comments-in-var-def.sh \
+ %D%/cond17.sh \
+ %D%/dist-srcdir2.sh \
+ %D%/gcj6.sh \
+ %D%/txinfo-nodist-info.sh \
+ %D%/override-conditional-2.sh \
+ %D%/dist-pr109765.sh \
+ %D%/instdir-cond2.sh \
+ %D%/interp3.sh \
+ %D%/java-nobase.sh \
+ %D%/objext-pr10128.sh \
+ %D%/override-conditional-pr13940.sh \
+ %D%/remake-timing-bug-pr8365.sh \
+ %D%/remake-am-pr10111.sh \
+ %D%/remake-m4-pr10111.sh \
+ %D%/subobj-vpath-pr13928.sh \
+ %D%/var-undef-append.sh \
+ $(perl_fake_XFAIL_TESTS)
+
# Some testsuite-influential variables should be overridable from the
# test scripts, but not from the environment.
# Keep this in sync with the similar list in ax/runtest.in.
@@ -69,40 +131,17 @@ AM_TESTS_ENVIRONMENT += \
PATH='$(abs_builddir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
export PATH;
-# Hand-written tests.
-
-include $(srcdir)/%D%/list-of-tests.mk
-
-TESTS += $(handwritten_TESTS)
-EXTRA_DIST += $(handwritten_TESTS)
-
-# Automatically-generated tests wrapping hand-written ones.
-# Also, automatically-computed dependencies for tests.
+# Automatically-computed dependencies for tests.
+include $(srcdir)/testsuite-autodeps.am
-include $(srcdir)/%D%/testsuite-part.am
-
-TESTS += $(generated_TESTS)
-EXTRA_DIST += $(generated_TESTS)
-
-$(srcdir)/%D%/testsuite-part.am:
- $(AM_V_at)rm -f %D%/testsuite-part.tmp $@
- $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
- --srcdir $(srcdir) > %D%/testsuite-part.tmp
- $(AM_V_at)chmod a-w %D%/testsuite-part.tmp
- $(AM_V_at)mv -f %D%/testsuite-part.tmp $@
-EXTRA_DIST += gen-testsuite-part
-
-# The dependecies declared here are not truly complete, but such
+# The dependencies declared here are not truly complete, but such
# completeness would cause more issues than it would solve. See
# automake bug#11347.
-$(generated_TESTS): $(srcdir)/gen-testsuite-part
-$(srcdir)/%D%/testsuite-part.am: $(srcdir)/gen-testsuite-part
-$(srcdir)/%D%/testsuite-part.am: Makefile.am
-
-# Hand-written tests for stuff in 'contrib/'.
-include $(srcdir)/contrib/%D%/Makefile.inc
-TESTS += $(contrib_TESTS)
-EXTRA_DIST += $(contrib_TESTS)
+$(srcdir)/testsuite-autodeps.am: $(srcdir)/gen-testsuite-part
+ $(AM_V_at)rm -f $(@F)-t $@
+ $(AM_V_GEN)$(PERL) $< --srcdir $(srcdir) > $(@F)-t
+ $(AM_V_at)chmod a-w $(@F)-t && mv -f $(@F)-t $@
+EXTRA_DIST += gen-testsuite-part
# Static dependencies valid for each test case (also further
# extended later). Note that use 'noinst_' rather than 'check_'
@@ -127,9 +166,8 @@ EXTRA_DIST += %D%/ax/distcheck-hook-m4.am
%D%/ax/test-defs.sh: %D%/ax/test-defs.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_at)$(MKDIR_P) %D%/ax
- $(AM_V_GEN)in=%D%/ax/test-defs.in \
- && $(do_subst) <$(srcdir)/$$in >$@-t
+ $(AM_V_at)$(MKDIR_P) $(@D)
+ $(AM_V_GEN)$(do_subst)
$(generated_file_finalize)
EXTRA_DIST += %D%/ax/test-defs.in
CLEANFILES += %D%/ax/test-defs.sh
@@ -137,10 +175,9 @@ nodist_noinst_DATA += %D%/ax/test-defs.sh
%D%/ax/shell-no-trail-bslash: %D%/ax/shell-no-trail-bslash.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_GEN)in=%D%/ax/shell-no-trail-bslash.in \
- && $(MKDIR_P) %D%/ax \
- && $(do_subst) <$(srcdir)/$$in >$@-t \
- && chmod a+x $@-t
+ $(AM_V_at)$(MKDIR_P) $(@D)
+ $(AM_V_GEN)$(do_subst)
+ $(AM_V_at)chmod a+x $@-t
$(generated_file_finalize)
EXTRA_DIST += %D%/ax/shell-no-trail-bslash.in
CLEANFILES += %D%/ax/shell-no-trail-bslash
@@ -148,10 +185,9 @@ nodist_noinst_SCRIPTS += %D%/ax/shell-no-trail-bslash
%D%/ax/cc-no-c-o: %D%/ax/cc-no-c-o.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_GEN)in=%D%/ax/cc-no-c-o.in \
- && $(MKDIR_P) %D%/ax \
- && $(do_subst) <$(srcdir)/$$in >$@-t \
- && chmod a+x $@-t
+ $(AM_V_at)$(MKDIR_P) $(@D)
+ $(AM_V_GEN)$(do_subst)
+ $(AM_V_at)chmod a+x $@-t
$(generated_file_finalize)
EXTRA_DIST += %D%/ax/cc-no-c-o.in
CLEANFILES += %D%/ax/cc-no-c-o
@@ -159,10 +195,9 @@ nodist_noinst_SCRIPTS += %D%/ax/cc-no-c-o
runtest: %D%/ax/runtest.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_GEN)in=%D%/ax/runtest.in \
- && $(MKDIR_P) %D%/ax \
- && $(do_subst) <$(srcdir)/$$in >$@-t \
- && chmod a+x $@-t
+ $(AM_V_at)$(MKDIR_P) $(@D)
+ $(AM_V_GEN)$(do_subst)
+ $(AM_V_at)chmod a+x $@-t
$(generated_file_finalize)
EXTRA_DIST += %D%/ax/runtest.in
CLEANFILES += runtest
@@ -225,7 +260,7 @@ check-local: check-tests-syntax
# that helps catching such problems in Automake-generated recipes.
# See automake bug#10436.
check-no-trailing-backslash-in-recipes:
- $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+ $(AM_V_GEN)$(MAKE) check \
CONFIG_SHELL='$(abs_top_builddir)/%D%/ax/shell-no-trail-bslash'
.PHONY: check-no-trailing-backslash-in-recipes
@@ -235,8 +270,7 @@ check-no-trailing-backslash-in-recipes:
# otherwise only present themselves later "in the wild". See also the
# long discussion about automake bug#13378.
check-cc-no-c-o:
- $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
- AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes
+ $(AM_V_GEN)$(MAKE) check AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes
.PHONY: check-cc-no-c-o
# Automake-generated Makefiles should work when run with parallel make.
@@ -245,21 +279,22 @@ check-parallel:
AM_TESTSUITE_MAKE="$${AM_TESTSUITE_MAKE-$${MAKE-make}} -j4"
.PHONY: check-parallel
-## Checking the list of tests.
-test_subdirs = %D% %D%/pm contrib/%D%
-include %D%/CheckListOfTests.am
-
# Run the testsuite with the installed aclocal and automake.
installcheck-local: installcheck-testsuite
installcheck-testsuite:
- $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
- am_running_installcheck=yes
+ $(AM_V_GEN)$(MAKE) check am_running_installcheck=yes
+# Run the testsuite without skipping expensive tests by default.
+check-expensive installcheck-expensive: %-expensive:
+ $(AM_V_GEN)$(MAKE) $* RUN_EXPENSIVE_TESTS=yes
+
# Performance tests.
-.PHONY: perf
perf: all
- $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+ $(AM_V_GEN)$(MAKE) check \
TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' TESTS='$(perf_TESTS)'
+.PHONY: perf
+perf_TESTS = $(wildcard $(srcdir)/%D%/perf/*.sh) \
+ $(wildcard $(srcdir)/%D%/perf/*.tap)
PERF_TEST_SUITE_LOG = %D%/perf/test-suite.log
CLEANFILES += $(PERF_TEST_SUITE_LOG)
EXTRA_DIST += $(perf_TESTS)