Brad Bishop | 83c4349 | 2017-05-22 22:04:03 -0400 | [diff] [blame] | 1 | include $(top_srcdir)/vars.mk |
| 2 | |
| 3 | AM_CPPFLAGS = -iquote$(top_srcdir)/src |
| 4 | gtest_cflags = $(PTHREAD_CFLAGS) |
| 5 | gtest_ldadd = -lgtest -lgtest_main -lgmock $(PTHREAD_LIBS) |
| 6 | |
| 7 | TEMPLATESEARCH+=${srcdir}/templates |
| 8 | |
| 9 | check_PROGRAMS = |
Brad Bishop | 13fd872 | 2017-05-15 12:44:01 -0400 | [diff] [blame] | 10 | noinst_PROGRAMS = |
Brad Bishop | 83c4349 | 2017-05-22 22:04:03 -0400 | [diff] [blame] | 11 | BUILT_SOURCES = |
| 12 | CLEANFILES = |
| 13 | |
| 14 | TESTS = $(check_PROGRAMS) |
Brad Bishop | b604480 | 2017-05-07 23:14:57 -0400 | [diff] [blame] | 15 | |
| 16 | check_PROGRAMS += pathgentest |
| 17 | pathgentest_SOURCES = \ |
| 18 | pathgentest.cpp |
| 19 | pathgentest_CXXFLAGS = \ |
| 20 | $(gtest_cflags) |
| 21 | pathgentest_LDFLAGS = \ |
| 22 | $(OESDK_TESTCASE_FLAGS) |
| 23 | pathgentest_LDADD = \ |
| 24 | ${gtest_ldadd} |
| 25 | |
| 26 | BUILT_SOURCES += pathgentest.hpp |
| 27 | CLEANFILES += pathgentest.hpp |
| 28 | |
| 29 | PATH_TEST_GEN_DEPS = \ |
| 30 | templates/pathgentest.mako.hpp \ |
| 31 | yaml/pathgentest |
| 32 | |
| 33 | pathgentest.hpp: $(PDMGEN) $(PATH_TEST_GEN_DEPS) |
| 34 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 35 | -t pathgentest.mako.hpp \ |
| 36 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 37 | -d ${srcdir}/yaml/pathgentest \ |
Brad Bishop | b604480 | 2017-05-07 23:14:57 -0400 | [diff] [blame] | 38 | -o $(builddir)/$@ \ |
| 39 | generate-cpp |
Brad Bishop | c9e173f | 2017-05-09 00:23:11 -0400 | [diff] [blame] | 40 | |
| 41 | check_PROGRAMS += propertygentest |
| 42 | propertygentest_SOURCES = \ |
| 43 | propertygentest.cpp |
| 44 | propertygentest_CXXFLAGS = \ |
| 45 | $(gtest_cflags) |
| 46 | propertygentest_LDFLAGS = \ |
| 47 | $(OESDK_TESTCASE_FLAGS) |
| 48 | propertygentest_LDADD = \ |
| 49 | ${gtest_ldadd} |
| 50 | |
| 51 | BUILT_SOURCES += propertygentest.hpp |
| 52 | CLEANFILES += propertygentest.hpp |
| 53 | |
| 54 | PROPERTY_TEST_GEN_DEPS = \ |
| 55 | templates/propertygentest.mako.hpp \ |
| 56 | yaml/propertygentest |
| 57 | |
| 58 | propertygentest.hpp: $(PROPERTY_TEST_GEN_DEPS) |
| 59 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 60 | -t propertygentest.mako.hpp \ |
| 61 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 62 | -d ${srcdir}/yaml/propertygentest \ |
Brad Bishop | c9e173f | 2017-05-09 00:23:11 -0400 | [diff] [blame] | 63 | -o $(builddir)/$@ \ |
| 64 | generate-cpp |
Brad Bishop | 13fd872 | 2017-05-15 12:44:01 -0400 | [diff] [blame] | 65 | |
| 66 | check_PROGRAMS += propertywatchgentest |
| 67 | propertywatchgentest_SOURCES = \ |
| 68 | propertywatchgentest.cpp |
| 69 | propertywatchgentest_CXXFLAGS = \ |
| 70 | $(gtest_cflags) |
| 71 | propertywatchgentest_LDFLAGS = \ |
| 72 | $(OESDK_TESTCASE_FLAGS) |
| 73 | propertywatchgentest_LDADD = \ |
| 74 | ${gtest_ldadd} |
| 75 | |
| 76 | BUILT_SOURCES += propertywatchgentest.hpp |
| 77 | CLEANFILES += propertywatchgentest.hpp |
| 78 | |
| 79 | PROPERTY_WATCH_TEST_GEN_DEPS = \ |
| 80 | templates/propertywatchgentest.mako.hpp \ |
| 81 | yaml/propertywatchgentest |
| 82 | |
| 83 | propertywatchgentest.hpp: $(PROPERTY_WATCH_TEST_GEN_DEPS) |
| 84 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 85 | -t propertywatchgentest.mako.hpp \ |
| 86 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 87 | -d ${srcdir}/yaml/propertywatchgentest \ |
Brad Bishop | 13fd872 | 2017-05-15 12:44:01 -0400 | [diff] [blame] | 88 | -o $(builddir)/$@ \ |
| 89 | generate-cpp |
| 90 | |
Matthew Barth | 22bf900 | 2019-10-10 15:25:28 -0500 | [diff] [blame] | 91 | check_PROGRAMS += propertywatchtest |
Brad Bishop | 13fd872 | 2017-05-15 12:44:01 -0400 | [diff] [blame] | 92 | propertywatchtest_SOURCES = \ |
| 93 | propertywatchtest.cpp |
| 94 | propertywatchtest_CXXFLAGS = \ |
| 95 | $(gtest_cflags) \ |
| 96 | ${SDBUSPLUS_CFLAGS} |
| 97 | propertywatchtest_LDFLAGS = \ |
| 98 | $(OESDK_TESTCASE_FLAGS) |
| 99 | propertywatchtest_LDADD = \ |
| 100 | ${gtest_ldadd} \ |
| 101 | ${SDBUSPLUS_LIBS} \ |
| 102 | $(builddir)/../propertywatch.o |
Brad Bishop | 3ce5c48 | 2017-05-25 21:31:58 -0400 | [diff] [blame] | 103 | |
| 104 | check_PROGRAMS += callbackgentest |
| 105 | callbackgentest_SOURCES = \ |
| 106 | callbackgentest.cpp |
| 107 | callbackgentest_CXXFLAGS = \ |
| 108 | $(gtest_cflags) |
| 109 | callbackgentest_LDFLAGS = \ |
| 110 | $(OESDK_TESTCASE_FLAGS) |
| 111 | callbackgentest_LDADD = \ |
| 112 | ${gtest_ldadd} |
| 113 | |
| 114 | BUILT_SOURCES += callbackgentest.hpp |
| 115 | CLEANFILES += callbackgentest.hpp |
| 116 | |
| 117 | CALLBACK_TEST_GEN_DEPS = \ |
| 118 | templates/callbackgentest.mako.hpp \ |
| 119 | yaml/callbackgentest |
| 120 | |
| 121 | callbackgentest.hpp: $(CALLBACK_TEST_GEN_DEPS) |
| 122 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 123 | -t callbackgentest.mako.hpp \ |
| 124 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 125 | -d ${srcdir}/yaml/callbackgentest \ |
Brad Bishop | 3ce5c48 | 2017-05-25 21:31:58 -0400 | [diff] [blame] | 126 | -o $(builddir)/$@ \ |
| 127 | generate-cpp |
Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 128 | |
| 129 | check_PROGRAMS += callbackgroupgentest |
| 130 | callbackgroupgentest_SOURCES = \ |
| 131 | callbackgroupgentest.cpp |
| 132 | callbackgroupgentest_CXXFLAGS = \ |
| 133 | $(gtest_cflags) |
| 134 | callbackgroupgentest_LDFLAGS = \ |
| 135 | $(OESDK_TESTCASE_FLAGS) |
| 136 | callbackgroupgentest_LDADD = \ |
| 137 | ${gtest_ldadd} |
| 138 | |
| 139 | BUILT_SOURCES += callbackgroupgentest.hpp |
| 140 | CLEANFILES += callbackgroupgentest.hpp |
| 141 | |
| 142 | CALLBACKGROUP_TEST_GEN_DEPS = \ |
| 143 | templates/callbackgroupgentest.mako.hpp \ |
| 144 | yaml/callbackgroupgentest |
| 145 | |
| 146 | callbackgroupgentest.hpp: $(CALLBACKGROUP_TEST_GEN_DEPS) |
| 147 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 148 | -t callbackgroupgentest.mako.hpp \ |
| 149 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 150 | -d ${srcdir}/yaml/callbackgroupgentest \ |
Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 151 | -o $(builddir)/$@ \ |
| 152 | generate-cpp |
Brad Bishop | b97bfff | 2017-05-25 22:14:54 -0400 | [diff] [blame] | 153 | |
| 154 | check_PROGRAMS += conditiongentest |
| 155 | conditiongentest_SOURCES = \ |
| 156 | conditiongentest.cpp |
| 157 | conditiongentest_CXXFLAGS = \ |
| 158 | $(gtest_cflags) |
| 159 | conditiongentest_LDFLAGS = \ |
| 160 | $(OESDK_TESTCASE_FLAGS) |
| 161 | conditiongentest_LDADD = \ |
| 162 | ${gtest_ldadd} |
| 163 | |
| 164 | BUILT_SOURCES += conditiongentest.hpp |
| 165 | CLEANFILES += conditiongentest.hpp |
| 166 | |
| 167 | CONDITION_TEST_GEN_DEPS = \ |
| 168 | templates/conditiongentest.mako.hpp \ |
| 169 | yaml/conditiongentest |
| 170 | |
| 171 | conditiongentest.hpp: $(CONDITION_TEST_GEN_DEPS) |
| 172 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 173 | -t conditiongentest.mako.hpp \ |
| 174 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 175 | -d ${srcdir}/yaml/conditiongentest \ |
Brad Bishop | b97bfff | 2017-05-25 22:14:54 -0400 | [diff] [blame] | 176 | -o $(builddir)/$@ \ |
| 177 | generate-cpp |
Brad Bishop | 18b228e | 2017-05-31 21:34:39 -0400 | [diff] [blame] | 178 | |
| 179 | check_PROGRAMS += callbacktest |
| 180 | callbacktest_SOURCES = \ |
| 181 | callbacktest.cpp |
| 182 | callbacktest_CXXFLAGS = \ |
| 183 | $(gtest_cflags) |
Gunnar Mills | 2c11e45 | 2017-08-14 16:13:32 -0500 | [diff] [blame] | 184 | $(SDBUSPLUS_CFLAGS) \ |
William A. Kennington III | 223c409 | 2018-10-19 15:56:09 -0700 | [diff] [blame] | 185 | $(SDEVENTPLUS_CFLAGS) \ |
Gunnar Mills | 2c11e45 | 2017-08-14 16:13:32 -0500 | [diff] [blame] | 186 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ |
| 187 | $(PHOSPHOR_LOGGING_CFLAGS) |
Brad Bishop | 18b228e | 2017-05-31 21:34:39 -0400 | [diff] [blame] | 188 | callbacktest_LDFLAGS = \ |
| 189 | $(OESDK_TESTCASE_FLAGS) |
| 190 | callbacktest_LDADD = \ |
| 191 | ${gtest_ldadd} \ |
| 192 | ${SDBUSPLUS_LIBS} \ |
William A. Kennington III | 223c409 | 2018-10-19 15:56:09 -0700 | [diff] [blame] | 193 | ${SDEVENTPLUS_LIBS} \ |
Gunnar Mills | 2c11e45 | 2017-08-14 16:13:32 -0500 | [diff] [blame] | 194 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 195 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 196 | $(builddir)/../journal.o \ |
Matt Spinler | 56fd833 | 2017-10-31 14:00:18 -0500 | [diff] [blame] | 197 | $(builddir)/../elog.o \ |
Ratan Gupta | 3e84ec6 | 2017-10-06 21:37:01 +0530 | [diff] [blame] | 198 | $(builddir)/../resolve_errors.o \ |
| 199 | $(builddir)/../event_manager.o \ |
Dhruvaraj Subhashchandran | 6524b9d | 2017-10-18 01:41:51 -0500 | [diff] [blame] | 200 | $(builddir)/../event_serialize.o \ |
Ratan Gupta | 3e84ec6 | 2017-10-06 21:37:01 +0530 | [diff] [blame] | 201 | -lstdc++fs |
Marri Devender Rao | e5576bf | 2018-04-16 05:56:11 -0500 | [diff] [blame] | 202 | |
| 203 | check_PROGRAMS += interfaceaddtest |
| 204 | interfaceaddtest_SOURCES = \ |
| 205 | interfaceaddtest.cpp |
| 206 | interfaceaddtest_CXXFLAGS = \ |
| 207 | $(gtest_cflags) |
| 208 | interfaceaddtest_LDFLAGS = \ |
| 209 | $(OESDK_TESTCASE_FLAGS) |
| 210 | interfaceaddtest_LDADD = \ |
| 211 | ${gtest_ldadd} |
| 212 | |
| 213 | BUILT_SOURCES += interfaceaddtest.hpp |
| 214 | CLEANFILES += interfaceaddtest.hpp |
| 215 | |
| 216 | INTERFACEADD_TEST_GEN_DEPS = \ |
| 217 | templates/interfaceaddtest.mako.hpp \ |
| 218 | yaml/interfaceaddtest |
| 219 | |
| 220 | interfaceaddtest.hpp: $(PDMGEN) $(INTERFACEADD_TEST_GEN_DEPS) |
| 221 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 222 | -t interfaceaddtest.mako.hpp \ |
| 223 | -p "${TEMPLATESEARCH}" \ |
| 224 | -d ${srcdir}/yaml/interfaceaddtest \ |
| 225 | -o $(builddir)/$@ \ |
| 226 | generate-cpp |