blob: aaae1ff822f87eea117d898c712000e9c02583ef [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
91# propertywatchtest is intentionally omitted from
92# check_PROGRAMS until a bug that manifests with
93# with GCC7 can be resolved.
94
95noinst_PROGRAMS += propertywatchtest
96propertywatchtest_SOURCES = \
97 propertywatchtest.cpp
98propertywatchtest_CXXFLAGS = \
99 $(gtest_cflags) \
100 ${SDBUSPLUS_CFLAGS}
101propertywatchtest_LDFLAGS = \
102 $(OESDK_TESTCASE_FLAGS)
103propertywatchtest_LDADD = \
104 ${gtest_ldadd} \
105 ${SDBUSPLUS_LIBS} \
106 $(builddir)/../propertywatch.o
Brad Bishop3ce5c482017-05-25 21:31:58 -0400107
108check_PROGRAMS += callbackgentest
109callbackgentest_SOURCES = \
110 callbackgentest.cpp
111callbackgentest_CXXFLAGS = \
112 $(gtest_cflags)
113callbackgentest_LDFLAGS = \
114 $(OESDK_TESTCASE_FLAGS)
115callbackgentest_LDADD = \
116 ${gtest_ldadd}
117
118BUILT_SOURCES += callbackgentest.hpp
119CLEANFILES += callbackgentest.hpp
120
121CALLBACK_TEST_GEN_DEPS = \
122 templates/callbackgentest.mako.hpp \
123 yaml/callbackgentest
124
125callbackgentest.hpp: $(CALLBACK_TEST_GEN_DEPS)
126 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
127 -t callbackgentest.mako.hpp \
128 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400129 -d ${srcdir}/yaml/callbackgentest \
Brad Bishop3ce5c482017-05-25 21:31:58 -0400130 -o $(builddir)/$@ \
131 generate-cpp
Brad Bishop731171a2017-05-25 21:49:32 -0400132
133check_PROGRAMS += callbackgroupgentest
134callbackgroupgentest_SOURCES = \
135 callbackgroupgentest.cpp
136callbackgroupgentest_CXXFLAGS = \
137 $(gtest_cflags)
138callbackgroupgentest_LDFLAGS = \
139 $(OESDK_TESTCASE_FLAGS)
140callbackgroupgentest_LDADD = \
141 ${gtest_ldadd}
142
143BUILT_SOURCES += callbackgroupgentest.hpp
144CLEANFILES += callbackgroupgentest.hpp
145
146CALLBACKGROUP_TEST_GEN_DEPS = \
147 templates/callbackgroupgentest.mako.hpp \
148 yaml/callbackgroupgentest
149
150callbackgroupgentest.hpp: $(CALLBACKGROUP_TEST_GEN_DEPS)
151 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
152 -t callbackgroupgentest.mako.hpp \
153 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400154 -d ${srcdir}/yaml/callbackgroupgentest \
Brad Bishop731171a2017-05-25 21:49:32 -0400155 -o $(builddir)/$@ \
156 generate-cpp
Brad Bishopb97bfff2017-05-25 22:14:54 -0400157
158check_PROGRAMS += conditiongentest
159conditiongentest_SOURCES = \
160 conditiongentest.cpp
161conditiongentest_CXXFLAGS = \
162 $(gtest_cflags)
163conditiongentest_LDFLAGS = \
164 $(OESDK_TESTCASE_FLAGS)
165conditiongentest_LDADD = \
166 ${gtest_ldadd}
167
168BUILT_SOURCES += conditiongentest.hpp
169CLEANFILES += conditiongentest.hpp
170
171CONDITION_TEST_GEN_DEPS = \
172 templates/conditiongentest.mako.hpp \
173 yaml/conditiongentest
174
175conditiongentest.hpp: $(CONDITION_TEST_GEN_DEPS)
176 $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
177 -t conditiongentest.mako.hpp \
178 -p "${TEMPLATESEARCH}" \
Brad Bishop2d6586a2017-05-31 19:43:35 -0400179 -d ${srcdir}/yaml/conditiongentest \
Brad Bishopb97bfff2017-05-25 22:14:54 -0400180 -o $(builddir)/$@ \
181 generate-cpp