From ee77be10b557458cebf2ce908126ddada58e4cd9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 12 Jun 2016 09:56:05 +0100 Subject: [PATCH] tests: clean up what is distributed Listing variables whose values are conditional in EXTRA_DIST is problematic: if Flatpak was configured without installed-tests, we would not distribute those files. This is a problem during distcheck, where installed-tests are disabled. For files not placed in a special subdirectory, glib-tap.mk handles this for us. For the keyring and the databases, we have to do it ourselves, by arranging for them to be in a dist_ variable that is special to Automake - when determining what to distribute, Automake includes anything that is selected for distribution under any combination of conditionals. While I'm here, include test keyring's README in tarballs: its advice is equally applicable in a tarball release. Signed-off-by: Simon McVittie --- Makefile.am | 1 + tests/Makefile.am.inc | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7bbfef70..88148ac8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ NULL = bin_PROGRAMS = $(NULL) +dist_installed_test_scripts = $(NULL) noinst_PROGRAMS = $(NULL) noinst_LTLIBRARIES = $(NULL) libexec_PROGRAMS = $(NULL) diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc index 23a69458..1d4a1074 100644 --- a/tests/Makefile.am.inc +++ b/tests/Makefile.am.inc @@ -59,7 +59,7 @@ tests/package_version.txt: Makefile tests/test-basic.sh: tests/package_version.txt -installed_test_SCRIPTS += \ +dist_installed_test_scripts += \ buildutil/tap-driver.sh \ tests/test-configure \ tests/make-test-app.sh \ @@ -79,16 +79,17 @@ installed_test_keyringdir = $(installed_testdir)/test-keyring installed_test_dbsdir = $(installed_testdir)/dbs if ENABLE_INSTALLED_TESTS -installed_test_keyring_DATA = \ +dist_installed_test_keyring_DATA = \ + tests/test-keyring/README \ tests/test-keyring/pubring.gpg \ tests/test-keyring/secring.gpg \ $(NULL) -installed_test_dbs_DATA = tests/dbs/no_tables +dist_installed_test_dbs_DATA = tests/dbs/no_tables endif -EXTRA_DIST += $(installed_test_SCRIPTS) $(installed_test_data) $(installed_test_keyring_DATA) $(installed_test_dbs_DATA) +EXTRA_DIST += $(installed_test_data) -test_scripts = \ +dist_test_scripts = \ tests/test-basic.sh \ tests/test-run.sh \ tests/test-run-system.sh \