Debian Codegraph @

src/testlib/Makefile.am

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 # -----------------------------------------------------------------------------
3 # Common cpp and ld flags for tests: these will be used an awful lot
4
5 TEST_CPP = \
6 -DSRCDIR=\"$(abs_srcdir)\" \
7 -DBUILDDIR=\"$(abs_builddir)\" \
8 $(glib_CFLAGS) \
9 $(json_glib_CFLAGS) \
10 $(AM_CPPFLAGS)
11
12 TEST_LIBS = \
13 libcockpit-test.a \
14 $(libcockpit_common_a_LIBS) \
15 $(json_glib_LIBS) \
16 $(glib_LIBS) \
17 $(NULL)
18
19 # -----------------------------------------------------------------------------
20 # Some helpful variables to get tests into TESTS and check_* in one go
21
22 # Unfortunately, we can't call these _PROGRAMS or _SCRIPTS because otherwise
23 # automake will treat them differently, which we don't want.
24
25 TEST_PROGRAM =
26 TESTS += $(TEST_PROGRAM)
27 check_PROGRAMS = $(TEST_PROGRAM)
28
29 TEST_SCRIPT =
30 TESTS += $(TEST_SCRIPT)
31 check_SCRIPTS = $(TEST_SCRIPT)
32
33 dist_TEST_SCRIPT =
34 TESTS += $(dist_TEST_SCRIPT)
35 dist_check_SCRIPTS = $(dist_TEST_SCRIPT)
36
37 # Testing assets should add themselves here (not EXTRA_DIST)
38 check_DATA =
39 dist_check_DATA =
40
41 # -----------------------------------------------------------------------------
42 # libcockpit-test.a: code used only for unit tests
43
44 check_LIBRARIES = libcockpit-test.a
45
46 libcockpit_test_a_CPPFLAGS = \
47 -DG_LOG_DOMAIN=\"cockpit-test\" \
48 $(TEST_CPP)
49
50 libcockpit_test_a_SOURCES = \
51 src/testlib/cockpittest.c \
52 src/testlib/cockpittest.h \
53 src/testlib/mock-auth.c \
54 src/testlib/mock-auth.h \
55 src/testlib/mock-channel.c \
56 src/testlib/mock-channel.h \
57 src/testlib/mock-pressure.c \
58 src/testlib/mock-pressure.h \
59 src/testlib/mock-transport.c \
60 src/testlib/mock-transport.h \
61 $(NULL)