blob: ddd42e60322bf7d2dc67442948f9710ffc152250 [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 \
Matt Spinler1e71a4d2020-03-04 13:40:22 -060013 extensions_test \
14 elog_update_ts_test
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050015
16test_cppflags = \
17 -Igtest \
18 $(GTEST_CPPFLAGS) \
19 $(AM_CPPFLAGS) \
20 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
21 $(SDBUSPLUS_CFLAGS)
22
23test_cxxflags = \
24 $(PTHREAD_CFLAGS)
25
26test_ldflags = \
27 -lgtest_main -lgtest \
Matt Spinler1787c522019-07-09 12:58:37 -050028 -lgmock -lstdc++fs \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050029 $(PTHREAD_LIBS) \
30 $(OESDK_TESTCASE_FLAGS) \
31 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
32 $(SDBUSPLUS_LIBS)
33
34test_ldadd = \
35 $(top_builddir)/elog_serialize.o \
36 $(top_builddir)/elog_entry.o \
37 $(top_builddir)/log_manager.o \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050038 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o \
39 $(top_builddir)/elog_meta.o \
40 $(top_builddir)/elog-lookup.o \
Patrick Venture59a6b1f2018-08-29 11:41:01 -070041 $(top_builddir)/elog-process-metadata.o \
Matt Spinler99c2b402019-05-23 14:29:16 -050042 $(top_builddir)/sdjournal.o \
43 $(top_builddir)/extensions.o
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050044
Patrick Venture59a6b1f2018-08-29 11:41:01 -070045remote_logging_test_ldadd = \
46 $(top_builddir)/phosphor-rsyslog-config/server-conf.o \
47 $(top_builddir)/sdjournal.o
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050048
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050049elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
50elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
51elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp
52elog_errorwrap_test_LDADD = $(test_ldadd)
53elog_errorwrap_test_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050054 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050055
56serialization_test_path_CPPFLAGS = $(test_cppflags)
57serialization_test_path_CXXFLAGS = $(test_cxxflags)
58serialization_test_path_SOURCES = serialization_test_path.cpp
59serialization_test_path_LDADD = $(test_ldadd)
60serialization_test_path_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050061 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050062
63serialization_test_properties_CPPFLAGS = $(test_cppflags)
64serialization_test_properties_CXXFLAGS = $(test_cxxflags)
65serialization_test_properties_SOURCES = serialization_test_properties.cpp
66serialization_test_properties_LDADD = $(test_ldadd)
67serialization_test_properties_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050068 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050069
70remote_logging_test_address_CPPFLAGS = $(test_cppflags)
71remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
72remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
73remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
74remote_logging_test_address_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050075 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050076
77remote_logging_test_port_CPPFLAGS = $(test_cppflags)
78remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
79remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
80remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
81remote_logging_test_port_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050082 $(test_ldflags)
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050083
84remote_logging_test_config_CPPFLAGS = $(test_cppflags)
85remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
86remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
87remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
88remote_logging_test_config_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050089 $(test_ldflags)
Adriana Kobylak7d111a82018-09-04 10:14:24 -050090
Patrick Venture31552c02018-12-03 19:09:55 -080091sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
92sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
93sdjournal_mock_test_SOURCES = sdtest.cpp
94sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o
95sdjournal_mock_test_LDFLAGS = $(test_ldflags)
96
Matt Spinler99c2b402019-05-23 14:29:16 -050097extensions_test_CPPFLAGS = $(test_cppflags)
98extensions_test_CXXFLAGS = $(test_cxxflags)
99extensions_test_SOURCES = extensions_test.cpp
100extensions_test_LDADD = \
101 $(top_builddir)/elog_entry.o \
102 $(top_builddir)/elog-lookup.o \
103 $(top_builddir)/elog_meta.o \
104 $(top_builddir)/elog-process-metadata.o \
105 $(top_builddir)/elog_serialize.o \
106 $(top_builddir)/log_manager.o \
Matt Spinler99c2b402019-05-23 14:29:16 -0500107 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
Matt Spinler1787c522019-07-09 12:58:37 -0500108extensions_test_LDFLAGS = $(test_ldflags)
Matt Spinler99c2b402019-05-23 14:29:16 -0500109
Matt Spinler1e71a4d2020-03-04 13:40:22 -0600110elog_update_ts_test_CPPFLAGS = $(test_cppflags)
111elog_update_ts_test_CXXFLAGS = $(test_cxxflags)
112elog_update_ts_test_SOURCES = elog_update_ts_test.cpp
113elog_update_ts_test_LDADD = $(test_ldadd)
114elog_update_ts_test_LDFLAGS = \
115 $(test_ldflags)
116
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500117# TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11
118XFAIL_TESTS = elog_errorwrap_test
Matt Spinler15ee6ae2019-07-08 16:50:06 -0500119
120if ENABLE_PEL_EXTENSION
121include openpower-pels/Makefile.include
122endif