summaryrefslogtreecommitdiff
path: root/Makecheck.am
blob: 7f0444be6d696633a32eef66e3ab6d0511ad6e85 (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
# Variables to be defined:
#
#  TEST_VERBOSE - set to 0 (default) 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

TEST_VERBOSE ?= 0

check-clean:
	[ -z "$(test_tmpdir)" ] || rm -fr $(test_tmpdir)

check-local: $(test_data) $(test_cases)
	[ -z "$(test_tmpdir)" ] || $(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))