source: trunk/debathena/third/schroot/test/Makefile.am @ 24314

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