From b86570f63e533abcbcb97c2572e0e5732a96307b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 11:40:31 +0200 Subject: Adding upstream version 1.20.13. Signed-off-by: Daniel Baumann --- check.am | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 check.am (limited to 'check.am') diff --git a/check.am b/check.am new file mode 100644 index 0000000..c7d6731 --- /dev/null +++ b/check.am @@ -0,0 +1,47 @@ +# Variables to be defined: +# +# TEST_VERBOSE - set to 0 (default) or 1 to control test suite verbosity +# TEST_PARALLEL - set to 1 (default) or N to control the parallel jobs +# 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_scripts - list of test case scripts +# test_programs - list of test case programs +# test_data - list of test data files + +TEST_VERBOSE ?= 0 +TEST_PARALLEL ?= 1 + +TEST_RUNNER = '\ + my $$harness = TAP::Harness->new({ \ + exec => sub { my (undef, $$test) = @_; \ + return [ $$test ] if $$test !~ "\.t\$$" and -x $$test; \ + return }, \ + lib => [ "$(top_srcdir)/scripts", "$(top_srcdir)/dselect/methods" ], \ + color => 1, \ + verbosity => $(TEST_VERBOSE), \ + jobs => $(TEST_PARALLEL), \ + failures => 1, \ + }); \ + my $$aggregate = $$harness->runtests(@ARGV); \ + die "FAIL: test suite has errors\n" if $$aggregate->has_errors;' + +check-clean: + [ -z "$(test_tmpdir)" ] || rm -fr $(test_tmpdir) + +check-local: $(test_data) $(test_programs) $(test_scripts) + [ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir) + PATH="$(abs_top_builddir)/src:$(abs_top_builddir)/scripts:$(abs_top_builddir)/utils:$(PATH)" \ + LC_ALL=C \ + DPKG_COLORS=never \ + $(TEST_ENV_VARS) \ + srcdir=$(srcdir) builddir=$(builddir) \ + CC=$(CC) \ + PERL=$(PERL) \ + SHELL=$(SHELL) \ + PERL_DL_NONLAZY=1 \ + PERL5LIB=$(abs_top_srcdir)/scripts:$(abs_top_srcdir)/dselect/methods \ + PERL5OPT=$(TEST_COVERAGE) \ + $(PERL) -MTAP::Harness -e $(TEST_RUNNER) \ + $(addprefix $(builddir)/,$(test_programs)) \ + $(addprefix $(srcdir)/,$(test_scripts)) -- cgit v1.2.3