summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2013-09-08 20:45:58 +0100
committerRoger Leigh <rleigh@debian.org>2013-09-08 20:45:58 +0100
commit90dda8b25a2a0914474e7fed26d155de9be7aae1 (patch)
tree051b6ae23ada52b98990b751599d5f46821938b6
parent67dc2ef1fc5b9b5b5a6edfced43d617974f5311a (diff)
downloadschroot-90dda8b25a2a0914474e7fed26d155de9be7aae1.tar.gz
test: Consolidate tests into a smaller number of programs
-rw-r--r--test/Makefile.am128
1 files changed, 25 insertions, 103 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 0dfd069a..e60bc86e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -20,56 +20,21 @@ if USE_UNIT_TESTS
noinst_PROGRAMS += \
test/sbuild/chroot/chroot \
- test/sbuild/chroot/plain \
- test/sbuild/chroot/custom \
- test/sbuild/chroot/file \
- test/sbuild/chroot/directory \
- test/sbuild/chroot/block-device \
- test/sbuild/chroot/loopback \
- test/sbuild/chroot/lvm-snapshot \
- test/sbuild/chroot/btrfs-snapshot \
test/sbuild/chroot/config \
- test/sbuild/chroot/facet/userdata \
- test/sbuild/environment \
+ test/sbuild/standard \
test/sbuild/keyfile \
test/sbuild/lock \
- test/sbuild/log \
- test/sbuild/nostream \
- test/sbuild/parse-value \
- test/sbuild/regex \
test/sbuild/run-parts \
- test/sbuild/util \
test/bin-common/option-action
-if BUILD_PERSONALITY
-noinst_PROGRAMS += \
- test/sbuild/personality
-personality_tests = test/sbuild/personality
-endif
-
-# sbuild-lock is excluded, because it is timing dependent and can fail
+# lock is excluded, because it is timing dependent and can fail
# randomly on slow or heavily-loaded systems.
TESTS = test/setup-test-data \
test/sbuild/chroot/chroot \
- test/sbuild/chroot/plain \
- test/sbuild/chroot/custom \
- test/sbuild/chroot/file \
- test/sbuild/chroot/directory \
- test/sbuild/chroot/block-device \
- test/sbuild/chroot/loopback \
- test/sbuild/chroot/lvm-snapshot \
- test/sbuild/chroot/btrfs-snapshot \
test/sbuild/chroot/config \
- test/sbuild/chroot/facet/userdata \
- test/sbuild/environment \
+ test/sbuild/standard \
test/sbuild/keyfile \
- test/sbuild/log \
- test/sbuild/nostream \
- test/sbuild/parse-value \
- $(personality_tests) \
test/sbuild/run-parts \
- test/sbuild/regex \
- test/sbuild/util \
test/bin-common/option-action \
test/cleanup-test-data
endif
@@ -94,61 +59,36 @@ test_sbuild_chroot_btrfssnap_sources = \
test/sbuild/chroot/btrfs-snapshot.cc
endif
-test_sbuild_chroot_chroot_SOURCES = \
- test/sbuild/chroot/chroot.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_chroot_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_plain_SOURCES = \
- test/sbuild/chroot/plain.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_plain_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_custom_SOURCES = \
- test/sbuild/chroot/custom.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_custom_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_file_SOURCES = \
- test/sbuild/chroot/file.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_file_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_directory_SOURCES = \
- test/sbuild/chroot/directory.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_directory_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_block_device_SOURCES = \
+if BUILD_PERSONALITY
+test_sbuild_personality_sources = \
+ test/sbuild/personality.cc
+endif
+test_sbuild_chroot_chroot_SOURCES = \
+ test/sbuild/chroot/chroot.h \
+ test/sbuild/chroot/chroot.cc \
+ test/sbuild/chroot/plain.cc \
+ test/sbuild/chroot/custom.cc \
+ test/sbuild/chroot/file.cc \
+ test/sbuild/chroot/directory.cc \
$(test_sbuild_chroot_blockdev_sources) \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_block_device_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_lvm_snapshot_SOURCES = \
$(test_sbuild_chroot_lvmsnap_sources) \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_lvm_snapshot_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_btrfs_snapshot_SOURCES = \
$(test_sbuild_chroot_btrfssnap_sources) \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_btrfs_snapshot_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_loopback_SOURCES = \
$(test_sbuild_chroot_loopback_sources) \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_loopback_LDADD = lib/test/libtest.la
-
-test_sbuild_chroot_facet_userdata_SOURCES = \
- test/sbuild/chroot/facet/userdata.cc \
- test/sbuild/chroot/chroot.h
-test_sbuild_chroot_facet_userdata_LDADD = lib/test/libtest.la
+ test/sbuild/chroot/facet/userdata.cc
+test_sbuild_chroot_chroot_LDADD = lib/test/libtest.la
test_sbuild_chroot_config_SOURCES = test/sbuild/chroot/config.cc
test_sbuild_chroot_config_LDADD = lib/test/libtest.la
-test_sbuild_environment_SOURCES = test/sbuild/environment.cc
-test_sbuild_environment_LDADD = lib/test/libtest.la
+test_sbuild_standard_SOURCES = \
+ test/sbuild/environment.cc \
+ test/sbuild/log.cc \
+ test/sbuild/nostream.cc \
+ test/sbuild/parse-value.cc \
+ $(test_sbuild_personality_sources) \
+ test/sbuild/regex.cc \
+ test/sbuild/util.cc
+test_sbuild_standard_LDADD = lib/test/libtest.la
test_sbuild_keyfile_SOURCES = test/sbuild/keyfile.cc
test_sbuild_keyfile_LDADD = lib/test/libtest.la
@@ -156,27 +96,9 @@ test_sbuild_keyfile_LDADD = lib/test/libtest.la
test_sbuild_lock_SOURCES = test/sbuild/lock.cc
test_sbuild_lock_LDADD = lib/test/libtest.la
-test_sbuild_log_SOURCES = test/sbuild/log.cc
-test_sbuild_log_LDADD = lib/test/libtest.la
-
-test_sbuild_nostream_SOURCES = test/sbuild/nostream.cc
-test_sbuild_nostream_LDADD = lib/test/libtest.la
-
-test_sbuild_parse_value_SOURCES = test/sbuild/parse-value.cc
-test_sbuild_parse_value_LDADD = lib/test/libtest.la
-
-test_sbuild_personality_SOURCES = test/sbuild/personality.cc
-test_sbuild_personality_LDADD = lib/test/libtest.la
-
-test_sbuild_regex_SOURCES = test/sbuild/regex.cc
-test_sbuild_regex_LDADD = lib/test/libtest.la
-
test_sbuild_run_parts_SOURCES = test/sbuild/run-parts.cc
test_sbuild_run_parts_LDADD = lib/test/libtest.la
-test_sbuild_util_SOURCES = test/sbuild/util.cc
-test_sbuild_util_LDADD = lib/test/libtest.la
-
test_bin_common_option_action_SOURCES = test/bin-common/option-action.cc
test_bin_common_option_action_LDADD = $(top_builddir)/lib/bin-common/libbin-common.la lib/test/libtest.la