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 | |
| 91 | # propertywatchtest is intentionally omitted from |
| 92 | # check_PROGRAMS until a bug that manifests with |
| 93 | # with GCC7 can be resolved. |
| 94 | |
| 95 | noinst_PROGRAMS += propertywatchtest |
| 96 | propertywatchtest_SOURCES = \ |
| 97 | propertywatchtest.cpp |
| 98 | propertywatchtest_CXXFLAGS = \ |
| 99 | $(gtest_cflags) \ |
| 100 | ${SDBUSPLUS_CFLAGS} |
| 101 | propertywatchtest_LDFLAGS = \ |
| 102 | $(OESDK_TESTCASE_FLAGS) |
| 103 | propertywatchtest_LDADD = \ |
| 104 | ${gtest_ldadd} \ |
| 105 | ${SDBUSPLUS_LIBS} \ |
| 106 | $(builddir)/../propertywatch.o |
Brad Bishop | 3ce5c48 | 2017-05-25 21:31:58 -0400 | [diff] [blame] | 107 | |
| 108 | check_PROGRAMS += callbackgentest |
| 109 | callbackgentest_SOURCES = \ |
| 110 | callbackgentest.cpp |
| 111 | callbackgentest_CXXFLAGS = \ |
| 112 | $(gtest_cflags) |
| 113 | callbackgentest_LDFLAGS = \ |
| 114 | $(OESDK_TESTCASE_FLAGS) |
| 115 | callbackgentest_LDADD = \ |
| 116 | ${gtest_ldadd} |
| 117 | |
| 118 | BUILT_SOURCES += callbackgentest.hpp |
| 119 | CLEANFILES += callbackgentest.hpp |
| 120 | |
| 121 | CALLBACK_TEST_GEN_DEPS = \ |
| 122 | templates/callbackgentest.mako.hpp \ |
| 123 | yaml/callbackgentest |
| 124 | |
| 125 | callbackgentest.hpp: $(CALLBACK_TEST_GEN_DEPS) |
| 126 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 127 | -t callbackgentest.mako.hpp \ |
| 128 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 129 | -d ${srcdir}/yaml/callbackgentest \ |
Brad Bishop | 3ce5c48 | 2017-05-25 21:31:58 -0400 | [diff] [blame] | 130 | -o $(builddir)/$@ \ |
| 131 | generate-cpp |
Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 132 | |
| 133 | check_PROGRAMS += callbackgroupgentest |
| 134 | callbackgroupgentest_SOURCES = \ |
| 135 | callbackgroupgentest.cpp |
| 136 | callbackgroupgentest_CXXFLAGS = \ |
| 137 | $(gtest_cflags) |
| 138 | callbackgroupgentest_LDFLAGS = \ |
| 139 | $(OESDK_TESTCASE_FLAGS) |
| 140 | callbackgroupgentest_LDADD = \ |
| 141 | ${gtest_ldadd} |
| 142 | |
| 143 | BUILT_SOURCES += callbackgroupgentest.hpp |
| 144 | CLEANFILES += callbackgroupgentest.hpp |
| 145 | |
| 146 | CALLBACKGROUP_TEST_GEN_DEPS = \ |
| 147 | templates/callbackgroupgentest.mako.hpp \ |
| 148 | yaml/callbackgroupgentest |
| 149 | |
| 150 | callbackgroupgentest.hpp: $(CALLBACKGROUP_TEST_GEN_DEPS) |
| 151 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 152 | -t callbackgroupgentest.mako.hpp \ |
| 153 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 154 | -d ${srcdir}/yaml/callbackgroupgentest \ |
Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 155 | -o $(builddir)/$@ \ |
| 156 | generate-cpp |
Brad Bishop | b97bfff | 2017-05-25 22:14:54 -0400 | [diff] [blame] | 157 | |
| 158 | check_PROGRAMS += conditiongentest |
| 159 | conditiongentest_SOURCES = \ |
| 160 | conditiongentest.cpp |
| 161 | conditiongentest_CXXFLAGS = \ |
| 162 | $(gtest_cflags) |
| 163 | conditiongentest_LDFLAGS = \ |
| 164 | $(OESDK_TESTCASE_FLAGS) |
| 165 | conditiongentest_LDADD = \ |
| 166 | ${gtest_ldadd} |
| 167 | |
| 168 | BUILT_SOURCES += conditiongentest.hpp |
| 169 | CLEANFILES += conditiongentest.hpp |
| 170 | |
| 171 | CONDITION_TEST_GEN_DEPS = \ |
| 172 | templates/conditiongentest.mako.hpp \ |
| 173 | yaml/conditiongentest |
| 174 | |
| 175 | conditiongentest.hpp: $(CONDITION_TEST_GEN_DEPS) |
| 176 | $(AM_V_GEN) $(PYTHON) $(PDMGEN) \ |
| 177 | -t conditiongentest.mako.hpp \ |
| 178 | -p "${TEMPLATESEARCH}" \ |
Brad Bishop | 2d6586a | 2017-05-31 19:43:35 -0400 | [diff] [blame] | 179 | -d ${srcdir}/yaml/conditiongentest \ |
Brad Bishop | b97bfff | 2017-05-25 22:14:54 -0400 | [diff] [blame] | 180 | -o $(builddir)/$@ \ |
| 181 | generate-cpp |
Brad Bishop | 18b228e | 2017-05-31 21:34:39 -0400 | [diff] [blame] | 182 | |
| 183 | check_PROGRAMS += callbacktest |
| 184 | callbacktest_SOURCES = \ |
| 185 | callbacktest.cpp |
| 186 | callbacktest_CXXFLAGS = \ |
| 187 | $(gtest_cflags) |
Gunnar Mills | 2c11e45 | 2017-08-14 16:13:32 -0500 | [diff] [blame] | 188 | $(SDBUSPLUS_CFLAGS) \ |
| 189 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ |
| 190 | $(PHOSPHOR_LOGGING_CFLAGS) |
Brad Bishop | 18b228e | 2017-05-31 21:34:39 -0400 | [diff] [blame] | 191 | callbacktest_LDFLAGS = \ |
| 192 | $(OESDK_TESTCASE_FLAGS) |
| 193 | callbacktest_LDADD = \ |
| 194 | ${gtest_ldadd} \ |
| 195 | ${SDBUSPLUS_LIBS} \ |
Gunnar Mills | 2c11e45 | 2017-08-14 16:13:32 -0500 | [diff] [blame] | 196 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 197 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 198 | $(builddir)/../journal.o \ |
Matt Spinler | 56fd833 | 2017-10-31 14:00:18 -0500 | [diff] [blame] | 199 | $(builddir)/../elog.o \ |
| 200 | $(builddir)/../resolve_errors.o |