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