Add testcases for property watches
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I9e9266901414c71a34d9686f2a45bc4764602d53
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 330bf3e..fe66203 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -7,6 +7,7 @@
TEMPLATESEARCH+=${srcdir}/templates
check_PROGRAMS =
+noinst_PROGRAMS =
BUILT_SOURCES =
CLEANFILES =
@@ -61,3 +62,45 @@
-d yaml/propertygentest \
-o $(builddir)/$@ \
generate-cpp
+
+check_PROGRAMS += propertywatchgentest
+propertywatchgentest_SOURCES = \
+ propertywatchgentest.cpp
+propertywatchgentest_CXXFLAGS = \
+ $(gtest_cflags)
+propertywatchgentest_LDFLAGS = \
+ $(OESDK_TESTCASE_FLAGS)
+propertywatchgentest_LDADD = \
+ ${gtest_ldadd}
+
+BUILT_SOURCES += propertywatchgentest.hpp
+CLEANFILES += propertywatchgentest.hpp
+
+PROPERTY_WATCH_TEST_GEN_DEPS = \
+ templates/propertywatchgentest.mako.hpp \
+ yaml/propertywatchgentest
+
+propertywatchgentest.hpp: $(PROPERTY_WATCH_TEST_GEN_DEPS)
+ $(AM_V_GEN) $(PYTHON) $(PDMGEN) \
+ -t propertywatchgentest.mako.hpp \
+ -p "${TEMPLATESEARCH}" \
+ -d yaml/propertywatchgentest \
+ -o $(builddir)/$@ \
+ generate-cpp
+
+# propertywatchtest is intentionally omitted from
+# check_PROGRAMS until a bug that manifests with
+# with GCC7 can be resolved.
+
+noinst_PROGRAMS += propertywatchtest
+propertywatchtest_SOURCES = \
+ propertywatchtest.cpp
+propertywatchtest_CXXFLAGS = \
+ $(gtest_cflags) \
+ ${SDBUSPLUS_CFLAGS}
+propertywatchtest_LDFLAGS = \
+ $(OESDK_TESTCASE_FLAGS)
+propertywatchtest_LDADD = \
+ ${gtest_ldadd} \
+ ${SDBUSPLUS_LIBS} \
+ $(builddir)/../propertywatch.o