blob: 64aa6d886ec4be82c124f6abedc24e5a1ab4a290 [file] [log] [blame]
Deepak Kodihalli707a3e12017-06-14 03:56:12 -05001AM_CPPFLAGS = -I${top_srcdir}
Andrew Geissler328889d2016-10-10 12:43:48 -05002
Andrew Geissler328889d2016-10-10 12:43:48 -05003TESTS = $(check_PROGRAMS)
4
Deepak Kodihalli707a3e12017-06-14 03:56:12 -05005check_PROGRAMS = \
Nagaraju Goruganti477b7312018-06-25 23:28:58 -05006 elog_errorwrap_test \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -05007 serialization_test_path \
Deepak Kodihalli834dcf12018-08-30 05:05:46 -05008 serialization_test_properties \
9 remote_logging_test_address \
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050010 remote_logging_test_port \
Patrick Venture31552c02018-12-03 19:09:55 -080011 remote_logging_test_config \
Matt Spinler99c2b402019-05-23 14:29:16 -050012 sdjournal_mock_test \
13 extensions_test
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050014
15test_cppflags = \
16 -Igtest \
17 $(GTEST_CPPFLAGS) \
18 $(AM_CPPFLAGS) \
19 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
20 $(SDBUSPLUS_CFLAGS)
21
22test_cxxflags = \
23 $(PTHREAD_CFLAGS)
24
25test_ldflags = \
26 -lgtest_main -lgtest \
Matt Spinler1787c522019-07-09 12:58:37 -050027 -lgmock -lstdc++fs \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050028 $(PTHREAD_LIBS) \
29 $(OESDK_TESTCASE_FLAGS) \
30 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
31 $(SDBUSPLUS_LIBS)
32
33test_ldadd = \
34 $(top_builddir)/elog_serialize.o \
35 $(top_builddir)/elog_entry.o \
36 $(top_builddir)/log_manager.o \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050037 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o \
38 $(top_builddir)/elog_meta.o \
39 $(top_builddir)/elog-lookup.o \
Patrick Venture59a6b1f2018-08-29 11:41:01 -070040 $(top_builddir)/elog-process-metadata.o \
Matt Spinler99c2b402019-05-23 14:29:16 -050041 $(top_builddir)/sdjournal.o \
42 $(top_builddir)/extensions.o
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050043
Patrick Venture59a6b1f2018-08-29 11:41:01 -070044remote_logging_test_ldadd = \
45 $(top_builddir)/phosphor-rsyslog-config/server-conf.o \
46 $(top_builddir)/sdjournal.o
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050047
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050048elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
49elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
50elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp
51elog_errorwrap_test_LDADD = $(test_ldadd)
52elog_errorwrap_test_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050053 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050054
55serialization_test_path_CPPFLAGS = $(test_cppflags)
56serialization_test_path_CXXFLAGS = $(test_cxxflags)
57serialization_test_path_SOURCES = serialization_test_path.cpp
58serialization_test_path_LDADD = $(test_ldadd)
59serialization_test_path_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050060 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050061
62serialization_test_properties_CPPFLAGS = $(test_cppflags)
63serialization_test_properties_CXXFLAGS = $(test_cxxflags)
64serialization_test_properties_SOURCES = serialization_test_properties.cpp
65serialization_test_properties_LDADD = $(test_ldadd)
66serialization_test_properties_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050067 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050068
69remote_logging_test_address_CPPFLAGS = $(test_cppflags)
70remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
71remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
72remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
73remote_logging_test_address_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050074 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050075
76remote_logging_test_port_CPPFLAGS = $(test_cppflags)
77remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
78remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
79remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
80remote_logging_test_port_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050081 $(test_ldflags)
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050082
83remote_logging_test_config_CPPFLAGS = $(test_cppflags)
84remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
85remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
86remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
87remote_logging_test_config_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050088 $(test_ldflags)
Adriana Kobylak7d111a82018-09-04 10:14:24 -050089
Patrick Venture31552c02018-12-03 19:09:55 -080090sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
91sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
92sdjournal_mock_test_SOURCES = sdtest.cpp
93sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o
94sdjournal_mock_test_LDFLAGS = $(test_ldflags)
95
Matt Spinler99c2b402019-05-23 14:29:16 -050096extensions_test_CPPFLAGS = $(test_cppflags)
97extensions_test_CXXFLAGS = $(test_cxxflags)
98extensions_test_SOURCES = extensions_test.cpp
99extensions_test_LDADD = \
100 $(top_builddir)/elog_entry.o \
101 $(top_builddir)/elog-lookup.o \
102 $(top_builddir)/elog_meta.o \
103 $(top_builddir)/elog-process-metadata.o \
104 $(top_builddir)/elog_serialize.o \
105 $(top_builddir)/log_manager.o \
Matt Spinler99c2b402019-05-23 14:29:16 -0500106 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
Matt Spinler1787c522019-07-09 12:58:37 -0500107extensions_test_LDFLAGS = $(test_ldflags)
Matt Spinler99c2b402019-05-23 14:29:16 -0500108
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500109# TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11
110XFAIL_TESTS = elog_errorwrap_test
Matt Spinler15ee6ae2019-07-08 16:50:06 -0500111
112if ENABLE_PEL_EXTENSION
113include openpower-pels/Makefile.include
114endif