Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 1 | AM_CPPFLAGS = -I$(top_srcdir) $(CODE_COVERAGE_CPPFLAGS) |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 2 | |
| 3 | TESTS = $(check_PROGRAMS) |
| 4 | |
| 5 | check_PROGRAMS = \ |
| 6 | libpldm_base_test \ |
Sampa Misra | 0db1dfa | 2019-03-19 00:15:31 -0500 | [diff] [blame] | 7 | libpldm_platform_test \ |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 8 | libpldmresponder_base_test \ |
| 9 | libpldm_bios_test \ |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 10 | libpldmresponder_bios_test \ |
Deepak Kodihalli | cb7f2d4 | 2019-06-19 13:25:31 +0530 | [diff] [blame] | 11 | libpldmresponder_pdr_state_effecter_test \ |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 12 | libpldmresponder_bios_table_test \ |
| 13 | libpldmresponder_platform_test |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 14 | |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 15 | if OEM_IBM |
| 16 | check_PROGRAMS += \ |
| 17 | libpldmoem_fileio_test \ |
| 18 | libpldmoemresponder_fileio_test |
| 19 | endif |
| 20 | |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 21 | test_cppflags = \ |
| 22 | -Igtest \ |
| 23 | $(GTEST_CPPFLAGS) \ |
| 24 | $(AM_CPPFLAGS) |
| 25 | |
| 26 | test_cxxflags = \ |
Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 27 | $(PTHREAD_CFLAGS) \ |
Jinu Joy Thomas | f666db1 | 2019-05-29 05:22:31 -0500 | [diff] [blame] | 28 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 29 | $(SDBUSPLUS_CFLAGS) \ |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 30 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 31 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 32 | |
| 33 | test_ldflags = \ |
| 34 | -lgtest_main \ |
| 35 | -lgtest \ |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 36 | -lgmock \ |
| 37 | -lstdc++fs \ |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 38 | $(PTHREAD_LIBS) \ |
Jinu Joy Thomas | f666db1 | 2019-05-29 05:22:31 -0500 | [diff] [blame] | 39 | $(SDBUSPLUS_LIBS) \ |
| 40 | $(PHOSPHOR_LOGGING_LIBS) \ |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 41 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 42 | $(OESDK_TESTCASE_FLAGS) |
| 43 | |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 44 | if OEM_IBM |
| 45 | test_ldflags += \ |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 46 | -lgmock \ |
| 47 | -lstdc++fs |
| 48 | endif |
| 49 | |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 50 | libpldm_base_test_CPPFLAGS = $(test_cppflags) |
| 51 | libpldm_base_test_CXXFLAGS = $(test_cxxflags) |
| 52 | libpldm_base_test_LDFLAGS = $(test_ldflags) |
Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 53 | libpldm_base_test_LDADD = \ |
| 54 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 55 | $(CODE_COVERAGE_LIBS) |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 56 | libpldm_base_test_SOURCES = libpldm_base_test.cpp |
| 57 | |
Sampa Misra | 0db1dfa | 2019-03-19 00:15:31 -0500 | [diff] [blame] | 58 | libpldm_platform_test_CPPFLAGS = $(test_cppflags) |
| 59 | libpldm_platform_test_CXXFLAGS = $(test_cxxflags) |
| 60 | libpldm_platform_test_LDFLAGS = $(test_ldflags) |
| 61 | libpldm_platform_test_LDADD = \ |
| 62 | $(top_builddir)/libpldm/libpldm_la-platform.o \ |
| 63 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 64 | $(CODE_COVERAGE_LIBS) |
| 65 | libpldm_platform_test_SOURCES = libpldm_platform_test.cpp |
| 66 | |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 67 | libpldm_bios_test_CPPFLAGS = $(test_cppflags) |
| 68 | libpldm_bios_test_CXXFLAGS = $(test_cxxflags) |
| 69 | libpldm_bios_test_LDFLAGS = $(test_ldflags) |
| 70 | libpldm_bios_test_LDADD = \ |
| 71 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 72 | $(top_builddir)/libpldm/libpldm_la-bios.o \ |
| 73 | $(CODE_COVERAGE_LIBS) |
| 74 | libpldm_bios_test_SOURCES = libpldm_bios_test.cpp |
| 75 | |
| 76 | libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags) |
| 77 | libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags) |
Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 78 | libpldmresponder_bios_test_LDFLAGS = \ |
| 79 | $(test_ldflags) \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 80 | $(SDBUSPLUS_LIBS) \ |
| 81 | -lstdc++fs |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 82 | libpldmresponder_bios_test_LDADD = \ |
Jinu Joy Thomas | f666db1 | 2019-05-29 05:22:31 -0500 | [diff] [blame] | 83 | $(top_builddir)/pldmd-registration.o \ |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 84 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \ |
| 85 | $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 86 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \ |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 87 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 88 | $(top_builddir)/libpldm/libpldm_la-bios.o \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 89 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \ |
Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 90 | $(CODE_COVERAGE_LIBS) \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 91 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 92 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 93 | $(SDBUSPLUS_LIBS) \ |
| 94 | -lstdc++fs |
Sampa Misra | 032bd50 | 2019-03-06 05:03:22 -0600 | [diff] [blame] | 95 | libpldmresponder_bios_test_SOURCES = \ |
| 96 | libpldmresponder_bios_test.cpp |
| 97 | |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 98 | libpldmresponder_base_test_CPPFLAGS = $(test_cppflags) |
| 99 | libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags) |
| 100 | libpldmresponder_base_test_LDFLAGS = $(test_ldflags) |
| 101 | libpldmresponder_base_test_LDADD = \ |
Jinu Joy Thomas | f666db1 | 2019-05-29 05:22:31 -0500 | [diff] [blame] | 102 | $(top_builddir)/pldmd-registration.o \ |
Priyanga | fb4bec9 | 2019-03-25 11:51:31 +0530 | [diff] [blame] | 103 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
Deepak Kodihalli | a038624 | 2019-04-25 07:27:18 -0500 | [diff] [blame] | 104 | $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \ |
| 105 | $(CODE_COVERAGE_LIBS) |
Deepak Kodihalli | 1b24f97 | 2019-02-01 04:09:13 -0600 | [diff] [blame] | 106 | libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 107 | |
| 108 | if OEM_IBM |
| 109 | libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \ |
| 110 | -I$(top_builddir)/oem/ibm/ \ |
| 111 | -I$(top_builddir)/libpldm/ |
| 112 | libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags) |
| 113 | libpldmoem_fileio_test_LDFLAGS = $(test_ldflags) |
| 114 | libpldmoem_fileio_test_LDADD = \ |
| 115 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 116 | $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o |
| 117 | libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp |
| 118 | |
| 119 | libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \ |
| 120 | -I$(top_builddir)/oem/ibm/ \ |
| 121 | -I$(top_builddir)/libpldm/ |
| 122 | libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags) |
| 123 | libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags) |
| 124 | libpldmoemresponder_fileio_test_LDADD = \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 125 | $(top_builddir)/pldmd-registration.o \ |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 126 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 127 | $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \ |
Tom Joseph | 0c6d22c | 2019-06-26 09:58:41 +0530 | [diff] [blame] | 128 | $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o\ |
| 129 | $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_table.o |
Jinu Joy Thomas | 7f57f44 | 2019-06-13 20:38:49 +0530 | [diff] [blame] | 130 | libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp |
| 131 | endif |
| 132 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 133 | libpldmresponder_pdr_state_effecter_test_CPPFLAGS = $(test_cppflags) |
| 134 | libpldmresponder_pdr_state_effecter_test_CXXFLAGS = $(test_cxxflags) |
| 135 | libpldmresponder_pdr_state_effecter_test_LDFLAGS = $(test_ldflags) |
| 136 | libpldmresponder_pdr_state_effecter_test_LDADD = \ |
| 137 | $(top_builddir)/libpldmresponder/libpldmresponder_la-pdr.o \ |
| 138 | $(top_builddir)/libpldmresponder/libpldmresponder_la-effecters.o \ |
| 139 | $(CODE_COVERAGE_LIBS) \ |
| 140 | $(SDBUSPLUS_LIBS) \ |
| 141 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 142 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 143 | -lstdc++fs |
| 144 | libpldmresponder_pdr_state_effecter_test_SOURCES = libpldmresponder_pdr_state_effecter_test.cpp |
Deepak Kodihalli | cb7f2d4 | 2019-06-19 13:25:31 +0530 | [diff] [blame] | 145 | |
| 146 | libpldmresponder_bios_table_test_CPPFLAGS = $(test_cppflags) |
| 147 | libpldmresponder_bios_table_test_CXXFLAGS = $(test_cxxflags) |
| 148 | libpldmresponder_bios_table_test_LDFLAGS = \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 149 | $(test_ldflags) \ |
| 150 | $(SDBUSPLUS_LIBS) |
Deepak Kodihalli | cb7f2d4 | 2019-06-19 13:25:31 +0530 | [diff] [blame] | 151 | libpldmresponder_bios_table_test_LDADD = \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 152 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \ |
| 153 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \ |
| 154 | $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \ |
| 155 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 156 | $(top_builddir)/libpldm/libpldm_la-bios.o \ |
| 157 | $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \ |
Deepak Kodihalli | cb7f2d4 | 2019-06-19 13:25:31 +0530 | [diff] [blame] | 158 | $(top_builddir)/pldmd-registration.o \ |
Sampa Misra | b37be31 | 2019-07-03 02:26:41 -0500 | [diff] [blame] | 159 | $(CODE_COVERAGE_LIBS) \ |
| 160 | $(SDBUSPLUS_LIBS) \ |
| 161 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 162 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Deepak Kodihalli | cb7f2d4 | 2019-06-19 13:25:31 +0530 | [diff] [blame] | 163 | -lstdc++fs |
| 164 | libpldmresponder_bios_table_test_SOURCES = \ |
| 165 | libpldmresponder_bios_table_test.cpp |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 166 | |
| 167 | libpldmresponder_platform_test_CPPFLAGS = $(test_cppflags) |
| 168 | libpldmresponder_platform_test_CXXFLAGS = $(test_cxxflags) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 169 | libpldmresponder_platform_test_LDFLAGS = $(test_ldflags) $(SDBUSPLUS_LIBS) |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 170 | libpldmresponder_platform_test_LDADD = \ |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 171 | $(top_builddir)/pldmd-registration.o \ |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 172 | $(top_builddir)/libpldm/libpldm_la-base.o \ |
| 173 | $(top_builddir)/libpldm/libpldm_la-platform.o \ |
| 174 | $(top_builddir)/libpldmresponder/libpldmresponder_la-pdr.o \ |
| 175 | $(top_builddir)/libpldmresponder/libpldmresponder_la-effecters.o \ |
| 176 | $(top_builddir)/libpldmresponder/libpldmresponder_la-platform.o \ |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 177 | $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 178 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 179 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
| 180 | $(SDBUSPLUS_LIBS) \ |
| 181 | $(CODE_COVERAGE_LIBS) \ |
| 182 | -lstdc++fs |
| 183 | libpldmresponder_platform_test_SOURCES = libpldmresponder_platform_test.cpp |