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