From 74f75bb15d5e8184716c255edfb7dd9bc446b7e8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 6 Aug 2010 16:01:43 +0200 Subject: [PATCH] Avoid duplicating the list of autotest files. Reviewed by Ben Pfaff --- tests/automake.mk | 13 +++++++++++-- tests/testsuite.at | 24 ------------------------ tests/testsuite.in | 8 ++++++++ 3 files changed, 19 insertions(+), 26 deletions(-) delete mode 100644 tests/testsuite.at create mode 100644 tests/testsuite.in diff --git a/tests/automake.mk b/tests/automake.mk index a926b160..354c97b0 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -419,8 +419,8 @@ EXTRA_DIST += \ tests/atlocal.in \ $(srcdir)/package.m4 \ $(TESTSUITE) + TESTSUITE_AT = \ - tests/testsuite.at \ tests/data/calendar.at \ tests/language/dictionary/mrsets.at \ tests/language/expressions/evaluate.at \ @@ -435,10 +435,19 @@ TESTSUITE_AT = \ tests/language/xforms/recode.at \ tests/math/moments.at \ tests/output/render.at \ + tests/output/charts.at \ tests/perl-module.at + TESTSUITE = $(srcdir)/tests/testsuite DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE) +$(srcdir)/tests/testsuite.at: tests/testsuite.in Makefile + cp $< $@ + for t in $(TESTSUITE_AT); do \ + echo "m4_include([$$t])" >> $@ ;\ + done + + CHECK_LOCAL += tests_check tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/output:src/ui/terminal $(TESTSUITEFLAGS) @@ -449,7 +458,7 @@ tests_clean: AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest -$(TESTSUITE): package.m4 $(TESTSUITE_AT) +$(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at mv $@.tmp $@ diff --git a/tests/testsuite.at b/tests/testsuite.at deleted file mode 100644 index 5f7a113d..00000000 --- a/tests/testsuite.at +++ /dev/null @@ -1,24 +0,0 @@ -AT_INIT - -# Define SKIP_IF for compatibility with Autotest before 2.64 -m4_ifndef([AT_SKIP_IF], - [m4_define([AT_SKIP_IF], - [AT_CHECK([($1) \ -&& exit 77 || exit 0], [0], [ignore], [ignore])])]) - -m4_include([tests/data/calendar.at]) -m4_include([tests/language/dictionary/mrsets.at]) -m4_include([tests/language/expressions/evaluate.at]) -m4_include([tests/language/stats/aggregate.at]) -m4_include([tests/language/stats/autorecode.at]) -m4_include([tests/language/stats/crosstabs.at]) -m4_include([tests/language/stats/descriptives.at]) -m4_include([tests/language/stats/factor.at]) -m4_include([tests/language/stats/flip.at]) -m4_include([tests/language/stats/frequencies.at]) -m4_include([tests/language/xforms/compute.at]) -m4_include([tests/language/xforms/recode.at]) -m4_include([tests/math/moments.at]) -m4_include([tests/output/render.at]) -m4_include([tests/output/charts.at]) -m4_include([tests/perl-module.at]) diff --git a/tests/testsuite.in b/tests/testsuite.in new file mode 100644 index 00000000..738ffeab --- /dev/null +++ b/tests/testsuite.in @@ -0,0 +1,8 @@ +AT_INIT + +# Define SKIP_IF for compatibility with Autotest before 2.64 +m4_ifndef([AT_SKIP_IF], + [m4_define([AT_SKIP_IF], + [AT_CHECK([($1) \ +&& exit 77 || exit 0], [0], [ignore], [ignore])])]) + -- 2.30.2