blob: ab1378a08b642fcb73b628939d0dd6cde98f0933 [file] [log] [blame]
Matt Spinler7a6ed302020-06-05 14:38:32 -05001AM_CPPFLAGS = -I${top_srcdir} \
2 $(CODE_COVERAGE_CPPFLAGS)
3AM_CFLAGS = \
4 $(CODE_COVERAGE_CFLAGS)
5AM_CXXFLAGS = \
6 $(CODE_COVERAGE_CXXFLAGS)
7AM_LDFLAGS = \
8 $(CODE_COVERAGE_LIBS)
Andrew Geissler328889d2016-10-10 12:43:48 -05009
Andrew Geissler328889d2016-10-10 12:43:48 -050010TESTS = $(check_PROGRAMS)
11
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050012check_PROGRAMS = \
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050013 elog_errorwrap_test \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050014 serialization_test_path \
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050015 serialization_test_properties \
16 remote_logging_test_address \
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050017 remote_logging_test_port \
Patrick Venture31552c02018-12-03 19:09:55 -080018 remote_logging_test_config \
Matt Spinler99c2b402019-05-23 14:29:16 -050019 sdjournal_mock_test \
Matt Spinler1e71a4d2020-03-04 13:40:22 -060020 extensions_test \
Andrew Geisslere4960ee2020-03-30 14:31:52 -050021 elog_update_ts_test \
22 elog_quiesce_test
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050023
24test_cppflags = \
25 -Igtest \
26 $(GTEST_CPPFLAGS) \
27 $(AM_CPPFLAGS) \
28 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Williams81a91e32020-05-28 14:39:28 -050029 $(SDBUSPLUS_CFLAGS) \
Matt Spinler7a6ed302020-06-05 14:38:32 -050030 $(SYSTEMD_CFLAGS) \
31 $(CODE_COVERAGE_CPPFLAGS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050032
33test_cxxflags = \
Matt Spinler7a6ed302020-06-05 14:38:32 -050034 $(PTHREAD_CFLAGS) \
35 $(CODE_COVERAGE_CXXFLAGS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050036
37test_ldflags = \
38 -lgtest_main -lgtest \
Matt Spinler1787c522019-07-09 12:58:37 -050039 -lgmock -lstdc++fs \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050040 $(PTHREAD_LIBS) \
41 $(OESDK_TESTCASE_FLAGS) \
42 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Williams81a91e32020-05-28 14:39:28 -050043 $(SDBUSPLUS_LIBS) \
Matt Spinler7a6ed302020-06-05 14:38:32 -050044 $(SYSTEMD_LIBS) \
45 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050046
47test_ldadd = \
48 $(top_builddir)/elog_serialize.o \
49 $(top_builddir)/elog_entry.o \
50 $(top_builddir)/log_manager.o \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050051 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o \
52 $(top_builddir)/elog_meta.o \
53 $(top_builddir)/elog-lookup.o \
Patrick Venture59a6b1f2018-08-29 11:41:01 -070054 $(top_builddir)/elog-process-metadata.o \
Matt Spinler99c2b402019-05-23 14:29:16 -050055 $(top_builddir)/sdjournal.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050056 $(top_builddir)/extensions.o \
57 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050058
Patrick Venture59a6b1f2018-08-29 11:41:01 -070059remote_logging_test_ldadd = \
60 $(top_builddir)/phosphor-rsyslog-config/server-conf.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050061 $(top_builddir)/sdjournal.o \
62 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050063
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050064elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
65elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
66elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp
67elog_errorwrap_test_LDADD = $(test_ldadd)
68elog_errorwrap_test_LDFLAGS = \
Matt Spinler7a6ed302020-06-05 14:38:32 -050069 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050070
71serialization_test_path_CPPFLAGS = $(test_cppflags)
72serialization_test_path_CXXFLAGS = $(test_cxxflags)
73serialization_test_path_SOURCES = serialization_test_path.cpp
74serialization_test_path_LDADD = $(test_ldadd)
75serialization_test_path_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050076 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050077
78serialization_test_properties_CPPFLAGS = $(test_cppflags)
79serialization_test_properties_CXXFLAGS = $(test_cxxflags)
80serialization_test_properties_SOURCES = serialization_test_properties.cpp
81serialization_test_properties_LDADD = $(test_ldadd)
82serialization_test_properties_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050083 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050084
85remote_logging_test_address_CPPFLAGS = $(test_cppflags)
86remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
87remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
88remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
89remote_logging_test_address_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050090 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050091
92remote_logging_test_port_CPPFLAGS = $(test_cppflags)
93remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
94remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
95remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
96remote_logging_test_port_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050097 $(test_ldflags)
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050098
99remote_logging_test_config_CPPFLAGS = $(test_cppflags)
100remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
101remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
102remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
103remote_logging_test_config_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -0500104 $(test_ldflags)
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500105
Patrick Venture31552c02018-12-03 19:09:55 -0800106sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
107sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
108sdjournal_mock_test_SOURCES = sdtest.cpp
Matt Spinler7a6ed302020-06-05 14:38:32 -0500109sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o \
110 $(CODE_COVERAGE_LIBS)
Patrick Venture31552c02018-12-03 19:09:55 -0800111sdjournal_mock_test_LDFLAGS = $(test_ldflags)
112
Matt Spinler99c2b402019-05-23 14:29:16 -0500113extensions_test_CPPFLAGS = $(test_cppflags)
114extensions_test_CXXFLAGS = $(test_cxxflags)
115extensions_test_SOURCES = extensions_test.cpp
116extensions_test_LDADD = \
117 $(top_builddir)/elog_entry.o \
118 $(top_builddir)/elog-lookup.o \
119 $(top_builddir)/elog_meta.o \
120 $(top_builddir)/elog-process-metadata.o \
121 $(top_builddir)/elog_serialize.o \
122 $(top_builddir)/log_manager.o \
Matt Spinler99c2b402019-05-23 14:29:16 -0500123 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
Matt Spinler1787c522019-07-09 12:58:37 -0500124extensions_test_LDFLAGS = $(test_ldflags)
Matt Spinler99c2b402019-05-23 14:29:16 -0500125
Matt Spinler1e71a4d2020-03-04 13:40:22 -0600126elog_update_ts_test_CPPFLAGS = $(test_cppflags)
127elog_update_ts_test_CXXFLAGS = $(test_cxxflags)
128elog_update_ts_test_SOURCES = elog_update_ts_test.cpp
129elog_update_ts_test_LDADD = $(test_ldadd)
130elog_update_ts_test_LDFLAGS = \
131 $(test_ldflags)
132
Andrew Geisslere4960ee2020-03-30 14:31:52 -0500133elog_quiesce_test_CPPFLAGS = $(test_cppflags)
134elog_quiesce_test_CXXFLAGS = $(test_cxxflags)
135elog_quiesce_test_SOURCES = elog_quiesce_test.cpp
136elog_quiesce_test_LDADD = $(test_ldadd)
137elog_quiesce_test_LDFLAGS = \
138 $(test_ldflags)
139
140
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500141# TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11
142XFAIL_TESTS = elog_errorwrap_test
Matt Spinler15ee6ae2019-07-08 16:50:06 -0500143
144if ENABLE_PEL_EXTENSION
145include openpower-pels/Makefile.include
146endif