summaryrefslogtreecommitdiff
path: root/Makecheck.am
blob: 42bade9de23c381c16796f747920c6a0209d2a50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# vim:set syn=automake:

# Variables to be defined:
#
#  TEST_VERBOSE - set to 0 or 1 to control test suite verbosity
#  TEST_ENV_VARS - environment variables to be set for the test suite
#  TEST_COVERAGE - set to the perl module in charge of getting test coverage
#  test_tmpdir - test suite temporary directory
#  test_cases - list of test case files
#  test_data - list of test data files

check-clean:
	rm -fr $(test_tmpdir)

check-local: $(test_data) $(test_cases)
	$(mkdir_p) $(test_tmpdir)
	PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)" \
	  LC_ALL=C \
	  $(TEST_ENV_VARS) \
	  srcdir=$(srcdir) builddir=$(builddir) \
	  PERL5LIB=$(top_srcdir)/scripts PERL_DL_NONLAZY=1 \
	  PERL5OPT=$(TEST_COVERAGE) \
	  $(PERL) -I$(top_srcdir)/scripts \
	    -MExtUtils::Command::MM -e "test_harness($(TEST_VERBOSE), '.')" \
	    $(addprefix $(srcdir)/,$(test_cases))