summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-10-03 20:01:43 +0200
committerGuillem Jover <guillem@debian.org>2014-10-06 00:27:20 +0200
commit9c68ece4293dcd844000a731edc20572c9240b5f (patch)
tree20ea9cab11379f5c050bb96a68ae4e6a36bcbce7
parent9540bc984b08c5936c5aad2f1cab15f3b3560b84 (diff)
downloaddpkg-9c68ece4293dcd844000a731edc20572c9240b5f.tar.gz
build: Split test_programs and test_scripts out of test_cases
We do not need TEST_PREFIX anymore, as the prefixes are implicit for each typo of test case. Use the build directory for compiled programs and the source directory for scripts.
-rw-r--r--Makefile.am4
-rw-r--r--check.am11
-rw-r--r--lib/dpkg/test/Makefile.am4
-rw-r--r--scripts/Makefile.am4
-rw-r--r--src/Makefile.am5
-rw-r--r--utils/Makefile.am5
6 files changed, 16 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index ca669793c..a829c98c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,7 +75,7 @@ EXTRA_DIST = \
debian/rules \
debian/shlibs.default \
debian/shlibs.override \
- $(test_cases) \
+ $(test_scripts) \
$(test_data) \
$(nil)
@@ -141,7 +141,7 @@ coverage:
coverage-clean:
endif
-test_cases = \
+test_scripts = \
test/pod.t \
test/critic.t \
$(nil)
diff --git a/check.am b/check.am
index 4d9b4bfe2..458214d5a 100644
--- a/check.am
+++ b/check.am
@@ -1,11 +1,11 @@
# Variables to be defined:
#
-# TEST_PREFIX - set to the path to prefix to each test case for execution
# 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_scripts - list of test case scripts
+# test_programs - list of test case programs
# test_data - list of test data files
TEST_VERBOSE ?= 0
@@ -23,7 +23,7 @@ TEST_RUNNER = '\
check-clean:
[ -z "$(test_tmpdir)" ] || rm -fr $(test_tmpdir)
-check-local: $(test_data) $(test_cases)
+check-local: $(test_data) $(test_programs) $(test_scripts)
[ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir)
PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)" \
LC_ALL=C \
@@ -32,6 +32,5 @@ check-local: $(test_data) $(test_cases)
PERL_DL_NONLAZY=1 \
PERL5OPT=$(TEST_COVERAGE) \
$(PERL) -MTAP::Harness -e $(TEST_RUNNER) \
- $(if $(TEST_PREFIX), \
- $(addprefix $(TEST_PREFIX)/,$(test_cases)), \
- $(addprefix $(srcdir)/,$(test_cases)))
+ $(addprefix $(builddir)/,$(test_programs)) \
+ $(addprefix $(srcdir)/,$(test_scripts))
diff --git a/lib/dpkg/test/Makefile.am b/lib/dpkg/test/Makefile.am
index 817ce3718..197f48200 100644
--- a/lib/dpkg/test/Makefile.am
+++ b/lib/dpkg/test/Makefile.am
@@ -33,8 +33,6 @@ check_PROGRAMS = \
t-trigger \
t-mod-db
-TEST_PREFIX = $(builddir)
-
-test_cases = $(check_PROGRAMS)
+test_programs = $(check_PROGRAMS)
include $(top_srcdir)/check.am
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 1bcdac2fb..4555babf0 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -44,7 +44,7 @@ EXTRA_DIST = \
dpkg-source.pl \
dpkg-vendor.pl \
changelog/debian.pl \
- $(test_cases) \
+ $(test_scripts) \
$(test_data)
@@ -188,7 +188,7 @@ TEST_COVERAGE = $(PERL_COVERAGE)
test_tmpdir = t.tmp
-test_cases = \
+test_scripts = \
t/Dpkg_Version.t \
t/Dpkg_Arch.t \
t/Dpkg_Package.t \
diff --git a/src/Makefile.am b/src/Makefile.am
index 3c4cc6949..2382d751e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,8 @@ LDADD = \
EXTRA_DIST = \
- $(test_cases)
+ $(test_scripts) \
+ $(nil)
bin_PROGRAMS = \
dpkg \
@@ -89,7 +90,7 @@ install-data-local:
test_tmpdir = t.tmp
-test_cases = \
+test_scripts = \
t/dpkg_divert.t
include $(top_srcdir)/check.am
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 9a573c7b5..8a5c9024f 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -12,7 +12,8 @@ AM_CPPFLAGS = \
EXTRA_DIST = \
README.alternatives \
- $(test_cases)
+ $(test_scripts) \
+ $(nil)
bin_PROGRAMS =
@@ -54,7 +55,7 @@ uninstall-local:
TEST_ENV_VARS = DPKG_DATADIR=$(top_srcdir)
test_tmpdir = t.tmp
-test_cases = \
+test_scripts = \
t/update_alternatives.t
include $(top_srcdir)/check.am