summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-22 22:04:03 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-23 18:56:57 -0400
commit83c4349e79252f476912d0305ac0e33828d6d54f (patch)
treee965b42a5ae2482620c6cad865fc9cee0014e3ba
parent870c3fc67cd66cfd90bf262433f5141e76fc2145 (diff)
downloadphosphor-dbus-monitor-83c4349e79252f476912d0305ac0e33828d6d54f.tar.gz
phosphor-dbus-monitor-83c4349e79252f476912d0305ac0e33828d6d54f.zip
build: Add a test directory
Add a test directory to host future unit tests. Change-Id: I5072cb3055386f7b1718edc45241c723d9e63a54 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--.gitignore1
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/test/.gitignore2
-rw-r--r--src/test/Makefile.am13
5 files changed, 19 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index d1d026c..23155c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ missing
stamp-h1
phosphor-dbus-monitor
generated.hpp
+test-driver
diff --git a/configure.ac b/configure.ac
index e738f3f..15abf12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,5 +53,5 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"],
AC_ARG_VAR(YAML_PATH, [The path to the yaml config files.])
AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="$srcdir/example"])
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 3fc5554..0dfe63b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,3 +29,5 @@ generated.hpp: $(PDMGEN) $(YAML_PATH) $(TEMPLATES)
-d ${srcdir}/example \
-o ${builddir}/$@ \
generate-cpp
+
+SUBDIRS = . test
diff --git a/src/test/.gitignore b/src/test/.gitignore
new file mode 100644
index 0000000..7e563b8
--- /dev/null
+++ b/src/test/.gitignore
@@ -0,0 +1,2 @@
+*.log
+*.trs
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
new file mode 100644
index 0000000..c44bffa
--- /dev/null
+++ b/src/test/Makefile.am
@@ -0,0 +1,13 @@
+include $(top_srcdir)/vars.mk
+
+AM_CPPFLAGS = -iquote$(top_srcdir)/src
+gtest_cflags = $(PTHREAD_CFLAGS)
+gtest_ldadd = -lgtest -lgtest_main -lgmock $(PTHREAD_LIBS)
+
+TEMPLATESEARCH+=${srcdir}/templates
+
+check_PROGRAMS =
+BUILT_SOURCES =
+CLEANFILES =
+
+TESTS = $(check_PROGRAMS)
OpenPOWER on IntegriCloud