1 # Variables to be defined:
3 # TEST_VERBOSE - set to 0 (default) or 1 to control test suite verbosity
4 # TEST_PARALLEL - set to 1 (default) or N to control the parallel jobs
5 # TEST_ENV_VARS - environment variables to be set for the test suite
6 # TEST_COVERAGE - set to the perl module in charge of getting test coverage
7 # test_tmpdir - test suite temporary directory
8 # test_scripts - list of test case scripts
9 # test_programs - list of test case programs
10 # test_data - list of test data files
16 my $$harness = TAP::Harness->new({ \
17 exec => sub { my (undef, $$test) = @_; \
18 return [ $$test ] if $$test !~ "\.t\$$" and -x $$test; \
20 lib => [ "$(top_srcdir)/scripts", "$(top_srcdir)/dselect/methods" ], \
22 verbosity => $(TEST_VERBOSE), \
23 jobs => $(TEST_PARALLEL), \
26 my $$aggregate = $$harness->runtests(@ARGV); \
27 die "FAIL: test suite has errors\n" if $$aggregate->has_errors;'
30 [ -z "$(test_tmpdir)" ] || rm -fr $(test_tmpdir)
32 check-local: $(test_data) $(test_programs) $(test_scripts)
33 [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir)
34 PATH="$(abs_top_builddir)/src:$(abs_top_builddir)/scripts:$(abs_top_builddir)/utils:$(PATH)" \
38 srcdir=$(srcdir) builddir=$(builddir) \
43 PERL5LIB=$(abs_top_srcdir)/scripts:$(abs_top_srcdir)/dselect/methods \
44 PERL5OPT=$(TEST_COVERAGE) \
45 $(PERL) -MTAP::Harness -e $(TEST_RUNNER) \
46 $(addprefix $(builddir)/,$(test_programs)) \
47 $(addprefix $(srcdir)/,$(test_scripts))