summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-07-27 15:22:42 -0500
committerGunnar Mills <gmills@us.ibm.com>2017-07-28 12:34:51 -0500
commit9925857a9ef0e47f105a21186a809a3b094461b3 (patch)
tree481de329c30d097c96e6aab93af86fff0f1d12e6 /test
parent835dfb8877fd2e78281e22b8b08dc29e0e9ef5a5 (diff)
downloadphosphor-gpio-monitor-9925857a9ef0e47f105a21186a809a3b094461b3.tar.gz
phosphor-gpio-monitor-9925857a9ef0e47f105a21186a809a3b094461b3.zip
Refactor GPIO Monitor class
Refactor the GPIO Monitor class to use a common class, Evdev, to inherit from. Evdev does the basic libevdev handling. Change-Id: I427aa9720b0bbbea0284c0babcc03ece92e55f5e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am7
-rw-r--r--test/utest.cpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 5bd15e7..ff34005 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,7 +7,8 @@ TESTS = $(check_PROGRAMS)
# # Build/add utest to test suite
check_PROGRAMS = utest
utest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS) $(PHOSPHOR_LOGGING_CFLAGS) $(LIBEVDEV_CFLAGS)
-utest_CXXFLAGS = $(PTHREAD_CFLAGS)
-utest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS) $(SYSTEMD_LIBS) $(PHOSPHOR_LOGGING_LIBS) $(LIBEVDEV_LIBS)
+utest_CXXFLAGS = $(PTHREAD_CFLAGS) $(LIBEVDEV_CFLAGS) $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
+utest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS) $(SYSTEMD_LIBS) $(PHOSPHOR_LOGGING_LIBS) \
+$(LIBEVDEV_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS)
utest_SOURCES = utest.cpp
-utest_LDADD = $(top_builddir)/monitor.o
+utest_LDADD = $(top_builddir)/monitor.o $(top_srcdir)/evdev.cpp
diff --git a/test/utest.cpp b/test/utest.cpp
index 3728244..c6b6f18 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -5,6 +5,7 @@
#include <linux/input.h>
#include <gtest/gtest.h>
#include "monitor.hpp"
+#include "evdev.hpp"
using namespace phosphor::gpio;
OpenPOWER on IntegriCloud