1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
|
# schroot Makefile template
#
#
# Copyright © 2004-2008 Roger Leigh <rleigh@debian.org>
#
# schroot is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# schroot is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
#
#####################################################################
include $(top_srcdir)/scripts/global.mk
LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin
if USE_UNIT_TESTS
noinst_LTLIBRARIES = libtest.la
noinst_PROGRAMS = \
sbuild-chroot \
sbuild-chroot-plain \
sbuild-chroot-file \
sbuild-chroot-directory \
sbuild-chroot-block-device \
sbuild-chroot-loopback \
sbuild-chroot-lvm-snapshot \
sbuild-chroot-btrfs-snapshot \
sbuild-chroot-config \
sbuild-environment \
sbuild-keyfile \
sbuild-lock \
sbuild-log \
sbuild-nostream \
sbuild-parse-value \
sbuild-personality \
sbuild-regex \
sbuild-run-parts \
sbuild-util \
schroot-base-option-action
# sbuild-lock is excluded, because it is timing dependent and can fail
# randomly on slow or heavily-loaded systems.
TESTS = setup-test-data \
sbuild-chroot \
sbuild-chroot-plain \
sbuild-chroot-file \
sbuild-chroot-directory \
sbuild-chroot-block-device \
sbuild-chroot-loopback \
sbuild-chroot-lvm-snapshot \
sbuild-chroot-btrfs-snapshot \
sbuild-chroot-config \
sbuild-environment \
sbuild-keyfile \
sbuild-log \
sbuild-nostream \
sbuild-parse-value \
sbuild-personality \
sbuild-run-parts \
sbuild-regex \
sbuild-util \
schroot-base-option-action \
cleanup-test-data
endif
libtest_la_SOURCES = \
test-helpers.h \
testmain.cc
libtest_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la $(CPPUNIT_LIBS)
if BUILD_BLOCKDEV
sbuild_chroot_blockdev_sources = \
sbuild-chroot-block-device.cc
endif
if BUILD_LOOPBACK
sbuild_chroot_loopback_sources = \
sbuild-chroot-loopback.cc
endif
if BUILD_LVMSNAP
sbuild_chroot_lvmsnap_sources = \
sbuild-chroot-lvm-snapshot.cc
endif
if BUILD_BTRFSSNAP
sbuild_chroot_btrfssnap_sources = \
sbuild-chroot-btrfs-snapshot.cc
endif
sbuild_chroot_SOURCES = \
sbuild-chroot.cc \
test-sbuild-chroot.h
sbuild_chroot_LDADD = libtest.la
sbuild_chroot_plain_SOURCES = \
sbuild-chroot-plain.cc \
test-sbuild-chroot.h
sbuild_chroot_plain_LDADD = libtest.la
sbuild_chroot_file_SOURCES = \
sbuild-chroot-file.cc \
test-sbuild-chroot.h
sbuild_chroot_file_LDADD = libtest.la
sbuild_chroot_directory_SOURCES = \
sbuild-chroot-directory.cc \
test-sbuild-chroot.h
sbuild_chroot_directory_LDADD = libtest.la
sbuild_chroot_block_device_SOURCES = \
$(sbuild_chroot_blockdev_sources) \
test-sbuild-chroot.h
sbuild_chroot_block_device_LDADD = libtest.la
sbuild_chroot_lvm_snapshot_SOURCES = \
$(sbuild_chroot_lvmsnap_sources) \
test-sbuild-chroot.h
sbuild_chroot_lvm_snapshot_LDADD = libtest.la
sbuild_chroot_btrfs_snapshot_SOURCES = \
$(sbuild_chroot_btrfssnap_sources) \
test-sbuild-chroot.h
sbuild_chroot_btrfs_snapshot_LDADD = libtest.la
sbuild_chroot_loopback_SOURCES = \
$(sbuild_chroot_loopback_sources) \
test-sbuild-chroot.h
sbuild_chroot_loopback_LDADD = libtest.la
sbuild_chroot_config_SOURCES = sbuild-chroot-config.cc
sbuild_chroot_config_LDADD = libtest.la
sbuild_environment_SOURCES = sbuild-environment.cc
sbuild_environment_LDADD = libtest.la
sbuild_keyfile_SOURCES = sbuild-keyfile.cc
sbuild_keyfile_LDADD = libtest.la
sbuild_lock_SOURCES = sbuild-lock.cc
sbuild_lock_LDADD = libtest.la
sbuild_log_SOURCES = sbuild-log.cc
sbuild_log_LDADD = libtest.la
sbuild_nostream_SOURCES = sbuild-nostream.cc
sbuild_nostream_LDADD = libtest.la
sbuild_parse_value_SOURCES = sbuild-parse-value.cc
sbuild_parse_value_LDADD = libtest.la
sbuild_personality_SOURCES = sbuild-personality.cc
sbuild_personality_LDADD = libtest.la
sbuild_regex_SOURCES = sbuild-regex.cc
sbuild_regex_LDADD = libtest.la
sbuild_run_parts_SOURCES = sbuild-run-parts.cc
sbuild_run_parts_LDADD = libtest.la
sbuild_util_SOURCES = sbuild-util.cc
sbuild_util_LDADD = libtest.la
schroot_base_option_action_SOURCES = schroot-base-option-action.cc
schroot_base_option_action_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la libtest.la
EXTRA_DIST = \
keyfile.ex1 \
config.ex1 \
config.ex2/file \
config.ex2/empty \
config.ex2/experimental \
config.ex2/sarge \
config.ex2/sid \
config.ex2/woody \
config-directory-deprecated.ex \
config-directory-fail.ex \
config-directory-valid.ex \
run-parts.ex1/10test1 \
run-parts.ex1/20test2 \
run-parts.ex1/30test3 \
run-parts.ex2 \
run-parts.ex3/50invalid \
setup-test-data \
cleanup-test-data
clean-local:
$(srcdir)/cleanup-test-data
|