Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 1 | AM_CPPFLAGS = -I${top_srcdir} \ |
| 2 | $(CODE_COVERAGE_CPPFLAGS) |
| 3 | AM_CFLAGS = \ |
| 4 | $(CODE_COVERAGE_CFLAGS) |
| 5 | AM_CXXFLAGS = \ |
| 6 | $(CODE_COVERAGE_CXXFLAGS) |
| 7 | AM_LDFLAGS = \ |
| 8 | $(CODE_COVERAGE_LIBS) |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 9 | |
Andrew Geissler | 328889d | 2016-10-10 12:43:48 -0500 | [diff] [blame] | 10 | TESTS = $(check_PROGRAMS) |
| 11 | |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 12 | check_PROGRAMS = \ |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 13 | elog_errorwrap_test \ |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 14 | serialization_test_path \ |
Deepak Kodihalli | 834dcf1 | 2018-08-30 05:05:46 -0500 | [diff] [blame] | 15 | serialization_test_properties \ |
| 16 | remote_logging_test_address \ |
Deepak Kodihalli | 5ac1bde | 2018-08-30 05:38:44 -0500 | [diff] [blame] | 17 | remote_logging_test_port \ |
Patrick Venture | 31552c0 | 2018-12-03 19:09:55 -0800 | [diff] [blame] | 18 | remote_logging_test_config \ |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 19 | sdjournal_mock_test \ |
Matt Spinler | 1e71a4d | 2020-03-04 13:40:22 -0600 | [diff] [blame] | 20 | extensions_test \ |
Andrew Geissler | e4960ee | 2020-03-30 14:31:52 -0500 | [diff] [blame] | 21 | elog_update_ts_test \ |
| 22 | elog_quiesce_test |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 23 | |
| 24 | test_cppflags = \ |
| 25 | -Igtest \ |
| 26 | $(GTEST_CPPFLAGS) \ |
| 27 | $(AM_CPPFLAGS) \ |
| 28 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ |
Patrick Williams | 81a91e3 | 2020-05-28 14:39:28 -0500 | [diff] [blame] | 29 | $(SDBUSPLUS_CFLAGS) \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 30 | $(SYSTEMD_CFLAGS) \ |
| 31 | $(CODE_COVERAGE_CPPFLAGS) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 32 | |
| 33 | test_cxxflags = \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 34 | $(PTHREAD_CFLAGS) \ |
| 35 | $(CODE_COVERAGE_CXXFLAGS) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 36 | |
| 37 | test_ldflags = \ |
| 38 | -lgtest_main -lgtest \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 39 | -lgmock -lstdc++fs \ |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 40 | $(PTHREAD_LIBS) \ |
| 41 | $(OESDK_TESTCASE_FLAGS) \ |
| 42 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Patrick Williams | 81a91e3 | 2020-05-28 14:39:28 -0500 | [diff] [blame] | 43 | $(SDBUSPLUS_LIBS) \ |
Adriana Kobylak | bc0c619 | 2021-02-11 09:17:45 -0600 | [diff] [blame] | 44 | $(SDEVENTPLUS_LIBS) \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 45 | $(SYSTEMD_LIBS) \ |
| 46 | $(CODE_COVERAGE_LIBS) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 47 | |
| 48 | test_ldadd = \ |
| 49 | $(top_builddir)/elog_serialize.o \ |
| 50 | $(top_builddir)/elog_entry.o \ |
| 51 | $(top_builddir)/log_manager.o \ |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 52 | $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o \ |
| 53 | $(top_builddir)/elog_meta.o \ |
| 54 | $(top_builddir)/elog-lookup.o \ |
Patrick Venture | 59a6b1f | 2018-08-29 11:41:01 -0700 | [diff] [blame] | 55 | $(top_builddir)/elog-process-metadata.o \ |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 56 | $(top_builddir)/sdjournal.o \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 57 | $(top_builddir)/extensions.o \ |
Matt Spinler | f61f292 | 2020-06-23 11:32:49 -0500 | [diff] [blame] | 58 | $(top_builddir)/util.o \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 59 | $(CODE_COVERAGE_LIBS) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 60 | |
Patrick Venture | 59a6b1f | 2018-08-29 11:41:01 -0700 | [diff] [blame] | 61 | remote_logging_test_ldadd = \ |
| 62 | $(top_builddir)/phosphor-rsyslog-config/server-conf.o \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 63 | $(top_builddir)/sdjournal.o \ |
| 64 | $(CODE_COVERAGE_LIBS) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 65 | |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 66 | elog_errorwrap_test_CPPFLAGS = $(test_cppflags) |
| 67 | elog_errorwrap_test_CXXFLAGS = $(test_cxxflags) |
| 68 | elog_errorwrap_test_SOURCES = elog_errorwrap_test.cpp |
| 69 | elog_errorwrap_test_LDADD = $(test_ldadd) |
| 70 | elog_errorwrap_test_LDFLAGS = \ |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 71 | $(test_ldflags) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 72 | |
| 73 | serialization_test_path_CPPFLAGS = $(test_cppflags) |
| 74 | serialization_test_path_CXXFLAGS = $(test_cxxflags) |
| 75 | serialization_test_path_SOURCES = serialization_test_path.cpp |
| 76 | serialization_test_path_LDADD = $(test_ldadd) |
| 77 | serialization_test_path_LDFLAGS = \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 78 | $(test_ldflags) |
Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 79 | |
| 80 | serialization_test_properties_CPPFLAGS = $(test_cppflags) |
| 81 | serialization_test_properties_CXXFLAGS = $(test_cxxflags) |
| 82 | serialization_test_properties_SOURCES = serialization_test_properties.cpp |
| 83 | serialization_test_properties_LDADD = $(test_ldadd) |
| 84 | serialization_test_properties_LDFLAGS = \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 85 | $(test_ldflags) |
Deepak Kodihalli | 834dcf1 | 2018-08-30 05:05:46 -0500 | [diff] [blame] | 86 | |
| 87 | remote_logging_test_address_CPPFLAGS = $(test_cppflags) |
| 88 | remote_logging_test_address_CXXFLAGS = $(test_cxxflags) |
| 89 | remote_logging_test_address_SOURCES = remote_logging_test_address.cpp |
| 90 | remote_logging_test_address_LDADD = $(remote_logging_test_ldadd) |
| 91 | remote_logging_test_address_LDFLAGS = \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 92 | $(test_ldflags) |
Deepak Kodihalli | 834dcf1 | 2018-08-30 05:05:46 -0500 | [diff] [blame] | 93 | |
| 94 | remote_logging_test_port_CPPFLAGS = $(test_cppflags) |
| 95 | remote_logging_test_port_CXXFLAGS = $(test_cxxflags) |
| 96 | remote_logging_test_port_SOURCES = remote_logging_test_port.cpp |
| 97 | remote_logging_test_port_LDADD = $(remote_logging_test_ldadd) |
| 98 | remote_logging_test_port_LDFLAGS = \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 99 | $(test_ldflags) |
Deepak Kodihalli | 5ac1bde | 2018-08-30 05:38:44 -0500 | [diff] [blame] | 100 | |
| 101 | remote_logging_test_config_CPPFLAGS = $(test_cppflags) |
| 102 | remote_logging_test_config_CXXFLAGS = $(test_cxxflags) |
| 103 | remote_logging_test_config_SOURCES = remote_logging_test_config.cpp |
| 104 | remote_logging_test_config_LDADD = $(remote_logging_test_ldadd) |
| 105 | remote_logging_test_config_LDFLAGS = \ |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 106 | $(test_ldflags) |
Adriana Kobylak | 7d111a8 | 2018-09-04 10:14:24 -0500 | [diff] [blame] | 107 | |
Patrick Venture | 31552c0 | 2018-12-03 19:09:55 -0800 | [diff] [blame] | 108 | sdjournal_mock_test_CPPFLAGS = $(test_cppflags) |
| 109 | sdjournal_mock_test_CXXFLAGS = $(test_cxxflags) |
| 110 | sdjournal_mock_test_SOURCES = sdtest.cpp |
Matt Spinler | 7a6ed30 | 2020-06-05 14:38:32 -0500 | [diff] [blame] | 111 | sdjournal_mock_test_LDADD = $(top_builddir)/sdjournal.o \ |
| 112 | $(CODE_COVERAGE_LIBS) |
Patrick Venture | 31552c0 | 2018-12-03 19:09:55 -0800 | [diff] [blame] | 113 | sdjournal_mock_test_LDFLAGS = $(test_ldflags) |
| 114 | |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 115 | extensions_test_CPPFLAGS = $(test_cppflags) |
| 116 | extensions_test_CXXFLAGS = $(test_cxxflags) |
| 117 | extensions_test_SOURCES = extensions_test.cpp |
| 118 | extensions_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 Spinler | f61f292 | 2020-06-23 11:32:49 -0500 | [diff] [blame] | 125 | $(top_builddir)/util.o \ |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 126 | $(top_builddir)/xyz/openbmc_project/Logging/Internal/Manager/server.o |
Matt Spinler | 1787c52 | 2019-07-09 12:58:37 -0500 | [diff] [blame] | 127 | extensions_test_LDFLAGS = $(test_ldflags) |
Matt Spinler | 99c2b40 | 2019-05-23 14:29:16 -0500 | [diff] [blame] | 128 | |
Matt Spinler | 1e71a4d | 2020-03-04 13:40:22 -0600 | [diff] [blame] | 129 | elog_update_ts_test_CPPFLAGS = $(test_cppflags) |
| 130 | elog_update_ts_test_CXXFLAGS = $(test_cxxflags) |
| 131 | elog_update_ts_test_SOURCES = elog_update_ts_test.cpp |
| 132 | elog_update_ts_test_LDADD = $(test_ldadd) |
| 133 | elog_update_ts_test_LDFLAGS = \ |
| 134 | $(test_ldflags) |
| 135 | |
Andrew Geissler | e4960ee | 2020-03-30 14:31:52 -0500 | [diff] [blame] | 136 | elog_quiesce_test_CPPFLAGS = $(test_cppflags) |
| 137 | elog_quiesce_test_CXXFLAGS = $(test_cxxflags) |
| 138 | elog_quiesce_test_SOURCES = elog_quiesce_test.cpp |
| 139 | elog_quiesce_test_LDADD = $(test_ldadd) |
| 140 | elog_quiesce_test_LDFLAGS = \ |
| 141 | $(test_ldflags) |
| 142 | |
| 143 | |
Adriana Kobylak | 7d111a8 | 2018-09-04 10:14:24 -0500 | [diff] [blame] | 144 | # TODO Remove once the test-case failure is resolved openbmc/phosphor-logging#11 |
| 145 | XFAIL_TESTS = elog_errorwrap_test |
Matt Spinler | 15ee6ae | 2019-07-08 16:50:06 -0500 | [diff] [blame] | 146 | |
| 147 | if ENABLE_PEL_EXTENSION |
| 148 | include openpower-pels/Makefile.include |
| 149 | endif |