blob: b14c0ae6ddd33fe4a4460bf46a90ed3161a30a28 [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 \
Matt Spinlerf61f2922020-06-23 11:32:49 -050057 $(top_builddir)/util.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050058 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050059
Patrick Venture59a6b1f2018-08-29 11:41:01 -070060remote_logging_test_ldadd = \
61 $(top_builddir)/phosphor-rsyslog-config/server-conf.o \
Matt Spinler7a6ed302020-06-05 14:38:32 -050062 $(top_builddir)/sdjournal.o \
63 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050064
Nagaraju Goruganti477b7312018-06-25 23:28:58 -050065elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
66elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
67elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp
68elog_errorwrap_test_LDADD = $(test_ldadd)
69elog_errorwrap_test_LDFLAGS = \
Matt Spinler7a6ed302020-06-05 14:38:32 -050070 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050071
72serialization_test_path_CPPFLAGS = $(test_cppflags)
73serialization_test_path_CXXFLAGS = $(test_cxxflags)
74serialization_test_path_SOURCES = serialization_test_path.cpp
75serialization_test_path_LDADD = $(test_ldadd)
76serialization_test_path_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050077 $(test_ldflags)
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050078
79serialization_test_properties_CPPFLAGS = $(test_cppflags)
80serialization_test_properties_CXXFLAGS = $(test_cxxflags)
81serialization_test_properties_SOURCES = serialization_test_properties.cpp
82serialization_test_properties_LDADD = $(test_ldadd)
83serialization_test_properties_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050084 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050085
86remote_logging_test_address_CPPFLAGS = $(test_cppflags)
87remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
88remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
89remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
90remote_logging_test_address_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050091 $(test_ldflags)
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050092
93remote_logging_test_port_CPPFLAGS = $(test_cppflags)
94remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
95remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
96remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
97remote_logging_test_port_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -050098 $(test_ldflags)
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050099
100remote_logging_test_config_CPPFLAGS = $(test_cppflags)
101remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
102remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
103remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
104remote_logging_test_config_LDFLAGS = \
Matt Spinler1787c522019-07-09 12:58:37 -0500105 $(test_ldflags)
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500106
Patrick Venture31552c02018-12-03 19:09:55 -0800107sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
108sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
109sdjournal_mock_test_SOURCES = sdtest.cpp
Matt Spinler7a6ed302020-06-05 14:38:32 -0500110sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o \
111 $(CODE_COVERAGE_LIBS)
Patrick Venture31552c02018-12-03 19:09:55 -0800112sdjournal_mock_test_LDFLAGS = $(test_ldflags)
113
Matt Spinler99c2b402019-05-23 14:29:16 -0500114extensions_test_CPPFLAGS = $(test_cppflags)
115extensions_test_CXXFLAGS = $(test_cxxflags)
116extensions_test_SOURCES = extensions_test.cpp
117extensions_test_LDADD = \
118 $(top_builddir)/elog_entry.o \
119 $(top_builddir)/elog-lookup.o \
120 $(top_builddir)/elog_meta.o \
121 $(top_builddir)/elog-process-metadata.o \
122 $(top_builddir)/elog_serialize.o \
123 $(top_builddir)/log_manager.o \
Matt Spinlerf61f2922020-06-23 11:32:49 -0500124 $(top_builddir)/util.o \
Matt Spinler99c2b402019-05-23 14:29:16 -0500125 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
Matt Spinler1787c522019-07-09 12:58:37 -0500126extensions_test_LDFLAGS = $(test_ldflags)
Matt Spinler99c2b402019-05-23 14:29:16 -0500127
Matt Spinler1e71a4d2020-03-04 13:40:22 -0600128elog_update_ts_test_CPPFLAGS = $(test_cppflags)
129elog_update_ts_test_CXXFLAGS = $(test_cxxflags)
130elog_update_ts_test_SOURCES = elog_update_ts_test.cpp
131elog_update_ts_test_LDADD = $(test_ldadd)
132elog_update_ts_test_LDFLAGS = \
133 $(test_ldflags)
134
Andrew Geisslere4960ee2020-03-30 14:31:52 -0500135elog_quiesce_test_CPPFLAGS = $(test_cppflags)
136elog_quiesce_test_CXXFLAGS = $(test_cxxflags)
137elog_quiesce_test_SOURCES = elog_quiesce_test.cpp
138elog_quiesce_test_LDADD = $(test_ldadd)
139elog_quiesce_test_LDFLAGS = \
140 $(test_ldflags)
141
142
Adriana Kobylak7d111a82018-09-04 10:14:24 -0500143# TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11
144XFAIL_TESTS = elog_errorwrap_test
Matt Spinler15ee6ae2019-07-08 16:50:06 -0500145
146if ENABLE_PEL_EXTENSION
147include openpower-pels/Makefile.include
148endif