blob: d054a4cf239ab3d36a2f116ea7c6c55281cd3b63 [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) \
Adriana Kobylakbc0c6192021-02-11 09:17:45 -060044 $(SDEVENTPLUS_LIBS) \
Matt Spinler7a6ed302020-06-05 14:38:32 -050045 $(SYSTEMD_LIBS) \
46 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050047
48test_ldadd = \
49 $(top_builddir)/elog_serialize.o \
50 $(top_builddir)/elog_entry.o \
51 $(top_builddir)/log_manager.o \
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050052 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o \
53 $(top_builddir)/elog_meta.o \
54 $(top_builddir)/elog-lookup.o \
Patrick Venture59a6b1f2018-08-29 11:41:01 -070055 $(top_builddir)/elog-process-metadata.o \
Matt Spinler99c2b402019-05-23 14:29:16 -050056 $(top_builddir)/sdjournal.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050057 $(top_builddir)/extensions.o \
Matt Spinlerf61f2922020-06-23 11:32:49 -050058 $(top_builddir)/util.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050059 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050060
Patrick Venture59a6b1f2018-08-29 11:41:01 -070061remote_logging_test_ldadd = \
62 $(top_builddir)/phosphor-rsyslog-config/server-conf.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050063 $(top_builddir)/sdjournal.o \
64 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050065
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050066elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
67elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
68elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp
69elog_errorwrap_test_LDADD = $(test_ldadd)
70elog_errorwrap_test_LDFLAGS = \
Matt Spinler7a6ed302020-06-05 14:38:32 -050071 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050072
73serialization_test_path_CPPFLAGS = $(test_cppflags)
74serialization_test_path_CXXFLAGS = $(test_cxxflags)
75serialization_test_path_SOURCES = serialization_test_path.cpp
76serialization_test_path_LDADD = $(test_ldadd)
77serialization_test_path_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050078 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050079
80serialization_test_properties_CPPFLAGS = $(test_cppflags)
81serialization_test_properties_CXXFLAGS = $(test_cxxflags)
82serialization_test_properties_SOURCES = serialization_test_properties.cpp
83serialization_test_properties_LDADD = $(test_ldadd)
84serialization_test_properties_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050085 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050086
87remote_logging_test_address_CPPFLAGS = $(test_cppflags)
88remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
89remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
90remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
91remote_logging_test_address_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050092 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050093
94remote_logging_test_port_CPPFLAGS = $(test_cppflags)
95remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
96remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
97remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
98remote_logging_test_port_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050099 $(test_ldflags)
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -0500100
101remote_logging_test_config_CPPFLAGS = $(test_cppflags)
102remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
103remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
104remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
105remote_logging_test_config_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -0500106 $(test_ldflags)
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500107
Patrick Venture31552c02018-12-03 19:09:55 -0800108sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
109sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
110sdjournal_mock_test_SOURCES = sdtest.cpp
Matt Spinler7a6ed302020-06-05 14:38:32 -0500111sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o \
112 $(CODE_COVERAGE_LIBS)
Patrick Venture31552c02018-12-03 19:09:55 -0800113sdjournal_mock_test_LDFLAGS = $(test_ldflags)
114
Matt Spinler99c2b402019-05-23 14:29:16 -0500115extensions_test_CPPFLAGS = $(test_cppflags)
116extensions_test_CXXFLAGS = $(test_cxxflags)
117extensions_test_SOURCES = extensions_test.cpp
118extensions_test_LDADD = \
119 $(top_builddir)/elog_entry.o \
120 $(top_builddir)/elog-lookup.o \
121 $(top_builddir)/elog_meta.o \
122 $(top_builddir)/elog-process-metadata.o \
123 $(top_builddir)/elog_serialize.o \
124 $(top_builddir)/log_manager.o \
Matt Spinlerf61f2922020-06-23 11:32:49 -0500125 $(top_builddir)/util.o \
Matt Spinler99c2b402019-05-23 14:29:16 -0500126 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
Matt Spinler1787c522019-07-09 12:58:37 -0500127extensions_test_LDFLAGS = $(test_ldflags)
Matt Spinler99c2b402019-05-23 14:29:16 -0500128
Matt Spinler1e71a4d2020-03-04 13:40:22 -0600129elog_update_ts_test_CPPFLAGS = $(test_cppflags)
130elog_update_ts_test_CXXFLAGS = $(test_cxxflags)
131elog_update_ts_test_SOURCES = elog_update_ts_test.cpp
132elog_update_ts_test_LDADD = $(test_ldadd)
133elog_update_ts_test_LDFLAGS = \
134 $(test_ldflags)
135
Andrew Geisslere4960ee2020-03-30 14:31:52 -0500136elog_quiesce_test_CPPFLAGS = $(test_cppflags)
137elog_quiesce_test_CXXFLAGS = $(test_cxxflags)
138elog_quiesce_test_SOURCES = elog_quiesce_test.cpp
139elog_quiesce_test_LDADD = $(test_ldadd)
140elog_quiesce_test_LDFLAGS = \
141 $(test_ldflags)
142
143
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500144# TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11
145XFAIL_TESTS = elog_errorwrap_test
Matt Spinler15ee6ae2019-07-08 16:50:06 -0500146
147if ENABLE_PEL_EXTENSION
148include openpower-pels/Makefile.include
149endif