summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-11-04 17:06:13 -0500
committerPatrick Williams <patrick@stwcx.xyz>2016-11-04 17:06:13 -0500
commit83a9d0bfe25c73f77a18eab040c6b4992e166e19 (patch)
treea86bbc249718ada134d167aba3396dd5bf1a347c
parent696e315927741a15c69e6b1510a3aa54e558bb72 (diff)
downloadsdbusplus-83a9d0bfe25c73f77a18eab040c6b4992e166e19.tar.gz
sdbusplus-83a9d0bfe25c73f77a18eab040c6b4992e166e19.zip
build: run testcases via autotools
Change-Id: Ie2aec28bac16388cef39558746dfe6ce8cba199e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac7
-rw-r--r--test/Makefile.am26
3 files changed, 33 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 07076d7..046ee20 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,3 +14,5 @@ nobase_include_HEADERS = \
sdbusplus/utility/tuple_to_array.hpp \
sdbusplus/utility/type_traits.hpp \
sdbusplus/vtable.hpp
+
+SUBDIRS = test
diff --git a/configure.ac b/configure.ac
index cc8de8a..7c491d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
AM_SILENT_RULES([yes])
# Checks for programs.
+AC_PROG_CXX
AC_PROG_CC
AM_PROG_AR
AC_PROG_INSTALL
@@ -18,7 +19,9 @@ PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])
# Checks for typedefs, structures, and compiler characteristics.
-AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CFLAGS])
+AX_CXX_COMPILE_STDCXX_14([noext])
+AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
+AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
# Checks for library functions.
LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot'
@@ -46,5 +49,5 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"],
)
# Create configured output
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..f7c41bd
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,26 @@
+check_PROGRAMS =
+
+TESTS = $(check_PROGRAMS)
+
+check_PROGRAMS += message_append
+message_append_CXXFLAGS = $(SYSTEMD_CFLAGS) $(PTHREAD_CFLAGS)
+message_append_LDFLAGS = $(SYSTEMD_LIBS) $(PTHREAD_LIBS)
+message_append_SOURCES = message/append.cpp
+
+check_PROGRAMS += message_read
+message_read_CXXFLAGS = $(SYSTEMD_CFLAGS) $(PTHREAD_CFLAGS)
+message_read_LDFLAGS = $(SYSTEMD_LIBS) $(PTHREAD_LIBS)
+message_read_SOURCES = message/read.cpp
+
+check_PROGRAMS += message_types
+message_types_SOURCES = message/types.cpp
+
+check_PROGRAMS += utility_tuple_to_array
+utility_tuple_to_array_SOURCES = utility/tuple_to_array.cpp
+
+check_PROGRAMS += utility_type_traits
+utility_type_traits_SOURCES = utility/type_traits.cpp
+
+check_PROGRAMS += vtable_vtable
+vtable_vtable_SOURCES = vtable/vtable.cpp vtable/vtable_c.c
+
OpenPOWER on IntegriCloud