blob: a55e9a901d21873dc3b7e3b037cd67e9dfb715a3 [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 \
Patrick Venturee681bc42018-12-03 20:16:38 -080027 -lgmock \
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 \
37 $(top_builddir)/org.openbmc.Associations.o \
38 $(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 = \
54 $(test_ldflags) \
55 -lstdc++fs
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050056
57serialization_test_path_CPPFLAGS = $(test_cppflags)
58serialization_test_path_CXXFLAGS = $(test_cxxflags)
59serialization_test_path_SOURCES = serialization_test_path.cpp
60serialization_test_path_LDADD = $(test_ldadd)
61serialization_test_path_LDFLAGS = \
62 $(test_ldflags) \
63 -lstdc++fs
64
65serialization_test_properties_CPPFLAGS = $(test_cppflags)
66serialization_test_properties_CXXFLAGS = $(test_cxxflags)
67serialization_test_properties_SOURCES = serialization_test_properties.cpp
68serialization_test_properties_LDADD = $(test_ldadd)
69serialization_test_properties_LDFLAGS = \
70 $(test_ldflags) \
71 -lstdc++fs
Deepak Kodihalli834dcf12018-08-30 05:05:46 -050072
73remote_logging_test_address_CPPFLAGS = $(test_cppflags)
74remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
75remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
76remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
77remote_logging_test_address_LDFLAGS = \
78 $(test_ldflags) \
79 -lstdc++fs
80
81remote_logging_test_port_CPPFLAGS = $(test_cppflags)
82remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
83remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
84remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
85remote_logging_test_port_LDFLAGS = \
86 $(test_ldflags) \
87 -lstdc++fs
Deepak Kodihalli5ac1bde2018-08-30 05:38:44 -050088
89remote_logging_test_config_CPPFLAGS = $(test_cppflags)
90remote_logging_test_config_CXXFLAGS = $(test_cxxflags)
91remote_logging_test_config_SOURCES = remote_logging_test_config.cpp
92remote_logging_test_config_LDADD = $(remote_logging_test_ldadd)
93remote_logging_test_config_LDFLAGS = \
94 $(test_ldflags) \
95 -lstdc++fs
Adriana Kobylak7d111a82018-09-04 10:14:24 -050096
Patrick Venture31552c02018-12-03 19:09:55 -080097sdjournal_mock_test_CPPFLAGS = $(test_cppflags)
98sdjournal_mock_test_CXXFLAGS = $(test_cxxflags)
99sdjournal_mock_test_SOURCES = sdtest.cpp
100sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o
101sdjournal_mock_test_LDFLAGS = $(test_ldflags)
102
Matt Spinler99c2b402019-05-23 14:29:16 -0500103extensions_test_CPPFLAGS = $(test_cppflags)
104extensions_test_CXXFLAGS = $(test_cxxflags)
105extensions_test_SOURCES = extensions_test.cpp
106extensions_test_LDADD = \
107 $(top_builddir)/elog_entry.o \
108 $(top_builddir)/elog-lookup.o \
109 $(top_builddir)/elog_meta.o \
110 $(top_builddir)/elog-process-metadata.o \
111 $(top_builddir)/elog_serialize.o \
112 $(top_builddir)/log_manager.o \
113 $(top_builddir)/org.openbmc.Associations.o \
114 $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o
115extensions_test_LDFLAGS = $(test_ldflags) -lstdc++fs
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