Pārlūkot izejas kodu

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.
Guillem Jover 11 gadi atpakaļ
vecāks
revīzija
9c68ece429
6 mainītis faili ar 16 papildinājumiem un 17 dzēšanām
  1. 2 2
      Makefile.am
  2. 5 6
      check.am
  3. 1 3
      lib/dpkg/test/Makefile.am
  4. 2 2
      scripts/Makefile.am
  5. 3 2
      src/Makefile.am
  6. 3 2
      utils/Makefile.am

+ 2 - 2
Makefile.am

@@ -75,7 +75,7 @@ EXTRA_DIST = \
 	debian/rules \
 	debian/rules \
 	debian/shlibs.default \
 	debian/shlibs.default \
 	debian/shlibs.override \
 	debian/shlibs.override \
-	$(test_cases) \
+	$(test_scripts) \
 	$(test_data) \
 	$(test_data) \
 	$(nil)
 	$(nil)
 
 
@@ -141,7 +141,7 @@ coverage:
 coverage-clean:
 coverage-clean:
 endif
 endif
 
 
-test_cases = \
+test_scripts = \
 	test/pod.t \
 	test/pod.t \
 	test/critic.t \
 	test/critic.t \
 	$(nil)
 	$(nil)

+ 5 - 6
check.am

@@ -1,11 +1,11 @@
 # Variables to be defined:
 # 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_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_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_COVERAGE - set to the perl module in charge of getting test coverage
 #  test_tmpdir - test suite temporary directory
 #  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_data - list of test data files
 
 
 TEST_VERBOSE ?= 0
 TEST_VERBOSE ?= 0
@@ -23,7 +23,7 @@ TEST_RUNNER = '\
 check-clean:
 check-clean:
 	[ -z "$(test_tmpdir)" ] || rm -fr $(test_tmpdir)
 	[ -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)
 	[ -z "$(test_tmpdir)" ] || $(MKDIR_P) $(test_tmpdir)
 	PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)" \
 	PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)" \
 	  LC_ALL=C \
 	  LC_ALL=C \
@@ -32,6 +32,5 @@ check-local: $(test_data) $(test_cases)
 	  PERL_DL_NONLAZY=1 \
 	  PERL_DL_NONLAZY=1 \
 	  PERL5OPT=$(TEST_COVERAGE) \
 	  PERL5OPT=$(TEST_COVERAGE) \
 	  $(PERL) -MTAP::Harness -e $(TEST_RUNNER) \
 	  $(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))

+ 1 - 3
lib/dpkg/test/Makefile.am

@@ -33,8 +33,6 @@ check_PROGRAMS = \
 	t-trigger \
 	t-trigger \
 	t-mod-db
 	t-mod-db
 
 
-TEST_PREFIX = $(builddir)
-
-test_cases = $(check_PROGRAMS)
+test_programs = $(check_PROGRAMS)
 
 
 include $(top_srcdir)/check.am
 include $(top_srcdir)/check.am

+ 2 - 2
scripts/Makefile.am

@@ -44,7 +44,7 @@ EXTRA_DIST = \
 	dpkg-source.pl \
 	dpkg-source.pl \
 	dpkg-vendor.pl \
 	dpkg-vendor.pl \
 	changelog/debian.pl \
 	changelog/debian.pl \
-	$(test_cases) \
+	$(test_scripts) \
 	$(test_data)
 	$(test_data)
 
 
 
 
@@ -188,7 +188,7 @@ TEST_COVERAGE = $(PERL_COVERAGE)
 
 
 test_tmpdir = t.tmp
 test_tmpdir = t.tmp
 
 
-test_cases = \
+test_scripts = \
 	t/Dpkg_Version.t \
 	t/Dpkg_Version.t \
 	t/Dpkg_Arch.t \
 	t/Dpkg_Arch.t \
 	t/Dpkg_Package.t \
 	t/Dpkg_Package.t \

+ 3 - 2
src/Makefile.am

@@ -15,7 +15,8 @@ LDADD = \
 
 
 
 
 EXTRA_DIST = \
 EXTRA_DIST = \
-	$(test_cases)
+	$(test_scripts) \
+	$(nil)
 
 
 bin_PROGRAMS = \
 bin_PROGRAMS = \
 	dpkg \
 	dpkg \
@@ -89,7 +90,7 @@ install-data-local:
 
 
 test_tmpdir = t.tmp
 test_tmpdir = t.tmp
 
 
-test_cases = \
+test_scripts = \
 	t/dpkg_divert.t
 	t/dpkg_divert.t
 
 
 include $(top_srcdir)/check.am
 include $(top_srcdir)/check.am

+ 3 - 2
utils/Makefile.am

@@ -12,7 +12,8 @@ AM_CPPFLAGS = \
 
 
 EXTRA_DIST = \
 EXTRA_DIST = \
 	README.alternatives \
 	README.alternatives \
-	$(test_cases)
+	$(test_scripts) \
+	$(nil)
 
 
 bin_PROGRAMS =
 bin_PROGRAMS =
 
 
@@ -54,7 +55,7 @@ uninstall-local:
 TEST_ENV_VARS = DPKG_DATADIR=$(top_srcdir)
 TEST_ENV_VARS = DPKG_DATADIR=$(top_srcdir)
 
 
 test_tmpdir = t.tmp
 test_tmpdir = t.tmp
-test_cases = \
+test_scripts = \
 	t/update_alternatives.t
 	t/update_alternatives.t
 
 
 include $(top_srcdir)/check.am
 include $(top_srcdir)/check.am