blob: 0faa76556a26c9e013660415ba836d692f508239 [file] [log] [blame]
Brad Bishop83c43492017-05-22 22:04:03 -04001include $(top_srcdir)/vars.mk
2
3AM_CPPFLAGS = -iquote$(top_srcdir)/src
4gtest_cflags = $(PTHREAD_CFLAGS)
5gtest_ldadd = -lgtest -lgtest_main -lgmock $(PTHREAD_LIBS)
6
7TEMPLATESEARCH+=${srcdir}/templates
8
9check_PROGRAMS =
Brad Bishop13fd8722017-05-15 12:44:01 -040010noinst_PROGRAMS =
Brad Bishop83c43492017-05-22 22:04:03 -040011BUILT_SOURCES =
12CLEANFILES =
13
14TESTS = $(check_PROGRAMS)
Brad Bishopb6044802017-05-07 23:14:57 -040015
16check_PROGRAMS += pathgentest
17pathgentest_SOURCES = \
18 pathgentest.cpp
19pathgentest_CXXFLAGS = \
20 $(gtest_cflags)
21pathgentest_LDFLAGS = \
22 $(OESDK_TESTCASE_FLAGS)
23pathgentest_LDADD = \
24 ${gtest_ldadd}
25
26BUILT_SOURCES += pathgentest.hpp
27CLEANFILES += pathgentest.hpp
28
29PATH_TEST_GEN_DEPS = \
30 templates/pathgentest.mako.hpp \
31 yaml/pathgentest
32
33pathgentest.hpp: $(PDMGEN) $(PATH_TEST_GEN_DEPS)
34 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
35 -t pathgentest.mako.hpp \
36 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -040037 -d ${srcdir}/yaml/pathgentest \
Brad Bishopb6044802017-05-07 23:14:57 -040038 -o $(builddir)/$@ \
39 generate-cpp
Brad Bishopc9e173f2017-05-09 00:23:11 -040040
41check_PROGRAMS += propertygentest
42propertygentest_SOURCES = \
43 propertygentest.cpp
44propertygentest_CXXFLAGS = \
45 $(gtest_cflags)
46propertygentest_LDFLAGS = \
47 $(OESDK_TESTCASE_FLAGS)
48propertygentest_LDADD = \
49 ${gtest_ldadd}
50
51BUILT_SOURCES += propertygentest.hpp
52CLEANFILES += propertygentest.hpp
53
54PROPERTY_TEST_GEN_DEPS = \
55 templates/propertygentest.mako.hpp \
56 yaml/propertygentest
57
58propertygentest.hpp: $(PROPERTY_TEST_GEN_DEPS)
59 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
60 -t propertygentest.mako.hpp \
61 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -040062 -d ${srcdir}/yaml/propertygentest \
Brad Bishopc9e173f2017-05-09 00:23:11 -040063 -o $(builddir)/$@ \
64 generate-cpp
Brad Bishop13fd8722017-05-15 12:44:01 -040065
66check_PROGRAMS += propertywatchgentest
67propertywatchgentest_SOURCES = \
68 propertywatchgentest.cpp
69propertywatchgentest_CXXFLAGS = \
70 $(gtest_cflags)
71propertywatchgentest_LDFLAGS = \
72 $(OESDK_TESTCASE_FLAGS)
73propertywatchgentest_LDADD = \
74 ${gtest_ldadd}
75
76BUILT_SOURCES += propertywatchgentest.hpp
77CLEANFILES += propertywatchgentest.hpp
78
79PROPERTY_WATCH_TEST_GEN_DEPS = \
80 templates/propertywatchgentest.mako.hpp \
81 yaml/propertywatchgentest
82
83propertywatchgentest.hpp: $(PROPERTY_WATCH_TEST_GEN_DEPS)
84 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
85 -t propertywatchgentest.mako.hpp \
86 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -040087 -d ${srcdir}/yaml/propertywatchgentest \
Brad Bishop13fd8722017-05-15 12:44:01 -040088 -o $(builddir)/$@ \
89 generate-cpp
90
Matthew Barth22bf9002019-10-10 15:25:28 -050091check_PROGRAMS += propertywatchtest
Brad Bishop13fd8722017-05-15 12:44:01 -040092propertywatchtest_SOURCES = \
93 propertywatchtest.cpp
94propertywatchtest_CXXFLAGS = \
95 $(gtest_cflags) \
96 ${SDBUSPLUS_CFLAGS}
97propertywatchtest_LDFLAGS = \
98 $(OESDK_TESTCASE_FLAGS)
99propertywatchtest_LDADD = \
100 ${gtest_ldadd} \
101 ${SDBUSPLUS_LIBS} \
102 $(builddir)/../propertywatch.o
Brad Bishop3ce5c482017-05-25 21:31:58 -0400103
104check_PROGRAMS += callbackgentest
105callbackgentest_SOURCES = \
106 callbackgentest.cpp
107callbackgentest_CXXFLAGS = \
108 $(gtest_cflags)
109callbackgentest_LDFLAGS = \
110 $(OESDK_TESTCASE_FLAGS)
111callbackgentest_LDADD = \
112 ${gtest_ldadd}
113
114BUILT_SOURCES += callbackgentest.hpp
115CLEANFILES += callbackgentest.hpp
116
117CALLBACK_TEST_GEN_DEPS = \
118 templates/callbackgentest.mako.hpp \
119 yaml/callbackgentest
120
121callbackgentest.hpp: $(CALLBACK_TEST_GEN_DEPS)
122 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
123 -t callbackgentest.mako.hpp \
124 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400125 -d ${srcdir}/yaml/callbackgentest \
Brad Bishop3ce5c482017-05-25 21:31:58 -0400126 -o $(builddir)/$@ \
127 generate-cpp
Brad Bishop731171a2017-05-25 21:49:32 -0400128
129check_PROGRAMS += callbackgroupgentest
130callbackgroupgentest_SOURCES = \
131 callbackgroupgentest.cpp
132callbackgroupgentest_CXXFLAGS = \
133 $(gtest_cflags)
134callbackgroupgentest_LDFLAGS = \
135 $(OESDK_TESTCASE_FLAGS)
136callbackgroupgentest_LDADD = \
137 ${gtest_ldadd}
138
139BUILT_SOURCES += callbackgroupgentest.hpp
140CLEANFILES += callbackgroupgentest.hpp
141
142CALLBACKGROUP_TEST_GEN_DEPS = \
143 templates/callbackgroupgentest.mako.hpp \
144 yaml/callbackgroupgentest
145
146callbackgroupgentest.hpp: $(CALLBACKGROUP_TEST_GEN_DEPS)
147 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
148 -t callbackgroupgentest.mako.hpp \
149 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400150 -d ${srcdir}/yaml/callbackgroupgentest \
Brad Bishop731171a2017-05-25 21:49:32 -0400151 -o $(builddir)/$@ \
152 generate-cpp
Brad Bishopb97bfff2017-05-25 22:14:54 -0400153
154check_PROGRAMS += conditiongentest
155conditiongentest_SOURCES = \
156 conditiongentest.cpp
157conditiongentest_CXXFLAGS = \
158 $(gtest_cflags)
159conditiongentest_LDFLAGS = \
160 $(OESDK_TESTCASE_FLAGS)
161conditiongentest_LDADD = \
162 ${gtest_ldadd}
163
164BUILT_SOURCES += conditiongentest.hpp
165CLEANFILES += conditiongentest.hpp
166
167CONDITION_TEST_GEN_DEPS = \
168 templates/conditiongentest.mako.hpp \
169 yaml/conditiongentest
170
171conditiongentest.hpp: $(CONDITION_TEST_GEN_DEPS)
172 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
173 -t conditiongentest.mako.hpp \
174 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400175 -d ${srcdir}/yaml/conditiongentest \
Brad Bishopb97bfff2017-05-25 22:14:54 -0400176 -o $(builddir)/$@ \
177 generate-cpp
Brad Bishop18b228e2017-05-31 21:34:39 -0400178
179check_PROGRAMS += callbacktest
180callbacktest_SOURCES = \
181 callbacktest.cpp
182callbacktest_CXXFLAGS = \
183 $(gtest_cflags)
Gunnar Mills2c11e452017-08-14 16:13:32 -0500184 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III223c4092018-10-19 15:56:09 -0700185 $(SDEVENTPLUS_CFLAGS) \
Gunnar Mills2c11e452017-08-14 16:13:32 -0500186 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
187 $(PHOSPHOR_LOGGING_CFLAGS)
Brad Bishop18b228e2017-05-31 21:34:39 -0400188callbacktest_LDFLAGS = \
189 $(OESDK_TESTCASE_FLAGS)
190callbacktest_LDADD = \
191 ${gtest_ldadd} \
192 ${SDBUSPLUS_LIBS} \
William A. Kennington III223c4092018-10-19 15:56:09 -0700193 ${SDEVENTPLUS_LIBS} \
Gunnar Mills2c11e452017-08-14 16:13:32 -0500194 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
195 $(PHOSPHOR_LOGGING_LIBS) \
196 $(builddir)/../journal.o \
Matt Spinler56fd8332017-10-31 14:00:18 -0500197 $(builddir)/../elog.o \
Ratan Gupta3e84ec62017-10-06 21:37:01 +0530198 $(builddir)/../resolve_errors.o \
199 $(builddir)/../event_manager.o \
Patrick Williams26dc0bc2022-06-16 17:06:18 -0500200 $(builddir)/../event_serialize.o
Marri Devender Raoe5576bf2018-04-16 05:56:11 -0500201
202check_PROGRAMS += interfaceaddtest
203interfaceaddtest_SOURCES = \
204 interfaceaddtest.cpp
205interfaceaddtest_CXXFLAGS = \
206 $(gtest_cflags)
207interfaceaddtest_LDFLAGS = \
208 $(OESDK_TESTCASE_FLAGS)
209interfaceaddtest_LDADD = \
210 ${gtest_ldadd}
211
212BUILT_SOURCES += interfaceaddtest.hpp
213CLEANFILES += interfaceaddtest.hpp
214
215INTERFACEADD_TEST_GEN_DEPS = \
216 templates/interfaceaddtest.mako.hpp \
217 yaml/interfaceaddtest
218
219interfaceaddtest.hpp: $(PDMGEN) $(INTERFACEADD_TEST_GEN_DEPS)
220 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
221 -t interfaceaddtest.mako.hpp \
222 -p "${TEMPLATESEARCH}" \
223 -d ${srcdir}/yaml/interfaceaddtest \
224 -o $(builddir)/$@ \
225 generate-cpp