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
- %D%/subobj-vpath-pr13928.sh \
+# 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%/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.