blob: 9891a28d6e123c3e92ad71a43b0ab2a2beaa92da [file] [log] [blame]
Priyangafb4bec92019-03-25 11:51:31 +05301AM_CPPFLAGS = -I$(top_srcdir) $(CODE_COVERAGE_CPPFLAGS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -06002
3TESTS = $(check_PROGRAMS)
4
5check_PROGRAMS = \
6 libpldm_base_test \
Sampa Misra0db1dfa2019-03-19 00:15:31 -05007 libpldm_platform_test \
Sampa Misra032bd502019-03-06 05:03:22 -06008 libpldmresponder_base_test \
9 libpldm_bios_test \
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -050010 libpldmresponder_bios_test \
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +053011 libpldmresponder_pdr_state_effecter_test \
Deepak Kodihalli557dfb02019-05-12 13:11:17 +053012 libpldmresponder_bios_table_test \
13 libpldmresponder_platform_test
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060014
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053015if OEM_IBM
16check_PROGRAMS += \
17 libpldmoem_fileio_test \
18 libpldmoemresponder_fileio_test
19endif
20
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060021test_cppflags = \
22 -Igtest \
23 $(GTEST_CPPFLAGS) \
24 $(AM_CPPFLAGS)
25
26test_cxxflags = \
Priyangafb4bec92019-03-25 11:51:31 +053027 $(PTHREAD_CFLAGS) \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050028 $(PHOSPHOR_LOGGING_CFLAGS) \
29 $(SDBUSPLUS_CFLAGS) \
Sampa Misraa2fa0702019-05-31 01:28:55 -050030 $(CODE_COVERAGE_CXXFLAGS) \
31 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060032
33test_ldflags = \
34 -lgtest_main \
35 -lgtest \
Sampa Misraa2fa0702019-05-31 01:28:55 -050036 -lgmock \
37 -lstdc++fs \
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060038 $(PTHREAD_LIBS) \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050039 $(SDBUSPLUS_LIBS) \
40 $(PHOSPHOR_LOGGING_LIBS) \
Sampa Misraa2fa0702019-05-31 01:28:55 -050041 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060042 $(OESDK_TESTCASE_FLAGS)
43
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053044if OEM_IBM
45test_ldflags += \
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053046 -lgmock \
47 -lstdc++fs
48endif
49
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060050libpldm_base_test_CPPFLAGS = $(test_cppflags)
51libpldm_base_test_CXXFLAGS = $(test_cxxflags)
52libpldm_base_test_LDFLAGS = $(test_ldflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050053libpldm_base_test_LDADD = \
54 $(top_builddir)/libpldm/libpldm_la-base.o \
55 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060056libpldm_base_test_SOURCES = libpldm_base_test.cpp
57
Sampa Misra0db1dfa2019-03-19 00:15:31 -050058libpldm_platform_test_CPPFLAGS = $(test_cppflags)
59libpldm_platform_test_CXXFLAGS = $(test_cxxflags)
60libpldm_platform_test_LDFLAGS = $(test_ldflags)
61libpldm_platform_test_LDADD = \
62 $(top_builddir)/libpldm/libpldm_la-platform.o \
63 $(top_builddir)/libpldm/libpldm_la-base.o \
64 $(CODE_COVERAGE_LIBS)
65libpldm_platform_test_SOURCES = libpldm_platform_test.cpp
66
Sampa Misra032bd502019-03-06 05:03:22 -060067libpldm_bios_test_CPPFLAGS = $(test_cppflags)
68libpldm_bios_test_CXXFLAGS = $(test_cxxflags)
69libpldm_bios_test_LDFLAGS = $(test_ldflags)
70libpldm_bios_test_LDADD = \
71 $(top_builddir)/libpldm/libpldm_la-base.o \
72 $(top_builddir)/libpldm/libpldm_la-bios.o \
73 $(CODE_COVERAGE_LIBS)
74libpldm_bios_test_SOURCES = libpldm_bios_test.cpp
75
76libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags)
77libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050078libpldmresponder_bios_test_LDFLAGS = \
79 $(test_ldflags) \
Sampa Misrab37be312019-07-03 02:26:41 -050080 $(SDBUSPLUS_LIBS) \
81 -lstdc++fs
Sampa Misra032bd502019-03-06 05:03:22 -060082libpldmresponder_bios_test_LDADD = \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050083 $(top_builddir)/pldmd-registration.o \
Sampa Misra032bd502019-03-06 05:03:22 -060084 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
85 $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
Sampa Misrab37be312019-07-03 02:26:41 -050086 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \
Sampa Misra032bd502019-03-06 05:03:22 -060087 $(top_builddir)/libpldm/libpldm_la-base.o \
88 $(top_builddir)/libpldm/libpldm_la-bios.o \
Sampa Misrab37be312019-07-03 02:26:41 -050089 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050090 $(CODE_COVERAGE_LIBS) \
Sampa Misrab37be312019-07-03 02:26:41 -050091 $(PHOSPHOR_LOGGING_LIBS) \
92 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
93 $(SDBUSPLUS_LIBS) \
94 -lstdc++fs
Sampa Misra032bd502019-03-06 05:03:22 -060095libpldmresponder_bios_test_SOURCES = \
96 libpldmresponder_bios_test.cpp
97
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060098libpldmresponder_base_test_CPPFLAGS = $(test_cppflags)
99libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags)
100libpldmresponder_base_test_LDFLAGS = $(test_ldflags)
101libpldmresponder_base_test_LDADD = \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -0500102 $(top_builddir)/pldmd-registration.o \
Priyangafb4bec92019-03-25 11:51:31 +0530103 $(top_builddir)/libpldm/libpldm_la-base.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -0500104 $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \
105 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -0600106libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530107
108if OEM_IBM
109libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \
110 -I$(top_builddir)/oem/ibm/ \
111 -I$(top_builddir)/libpldm/
112libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags)
113libpldmoem_fileio_test_LDFLAGS = $(test_ldflags)
114libpldmoem_fileio_test_LDADD = \
115 $(top_builddir)/libpldm/libpldm_la-base.o \
116 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o
117libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp
118
119libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \
120 -I$(top_builddir)/oem/ibm/ \
121 -I$(top_builddir)/libpldm/
122libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags)
123libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags)
124libpldmoemresponder_fileio_test_LDADD = \
Sampa Misrab37be312019-07-03 02:26:41 -0500125 $(top_builddir)/pldmd-registration.o \
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530126 $(top_builddir)/libpldm/libpldm_la-base.o \
127 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \
Tom Joseph0c6d22c2019-06-26 09:58:41 +0530128 $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o\
129 $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_table.o
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530130libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp
131endif
132
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -0500133libpldmresponder_pdr_state_effecter_test_CPPFLAGS = $(test_cppflags)
134libpldmresponder_pdr_state_effecter_test_CXXFLAGS = $(test_cxxflags)
135libpldmresponder_pdr_state_effecter_test_LDFLAGS = $(test_ldflags)
136libpldmresponder_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
144libpldmresponder_pdr_state_effecter_test_SOURCES = libpldmresponder_pdr_state_effecter_test.cpp
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530145
146libpldmresponder_bios_table_test_CPPFLAGS = $(test_cppflags)
147libpldmresponder_bios_table_test_CXXFLAGS = $(test_cxxflags)
148libpldmresponder_bios_table_test_LDFLAGS = \
Sampa Misrab37be312019-07-03 02:26:41 -0500149 $(test_ldflags) \
150 $(SDBUSPLUS_LIBS)
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530151libpldmresponder_bios_table_test_LDADD = \
Sampa Misrab37be312019-07-03 02:26:41 -0500152 $(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 Kodihallicb7f2d42019-06-19 13:25:31 +0530158 $(top_builddir)/pldmd-registration.o \
Sampa Misrab37be312019-07-03 02:26:41 -0500159 $(CODE_COVERAGE_LIBS) \
160 $(SDBUSPLUS_LIBS) \
161 $(PHOSPHOR_LOGGING_LIBS) \
162 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530163 -lstdc++fs
164libpldmresponder_bios_table_test_SOURCES = \
165 libpldmresponder_bios_table_test.cpp
Deepak Kodihalli557dfb02019-05-12 13:11:17 +0530166
167libpldmresponder_platform_test_CPPFLAGS = $(test_cppflags)
168libpldmresponder_platform_test_CXXFLAGS = $(test_cxxflags)
Sampa Misraa2fa0702019-05-31 01:28:55 -0500169libpldmresponder_platform_test_LDFLAGS = $(test_ldflags) $(SDBUSPLUS_LIBS)
Deepak Kodihalli557dfb02019-05-12 13:11:17 +0530170libpldmresponder_platform_test_LDADD = \
Sampa Misraa2fa0702019-05-31 01:28:55 -0500171 $(top_builddir)/pldmd-registration.o \
Deepak Kodihalli557dfb02019-05-12 13:11:17 +0530172 $(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 Misraa2fa0702019-05-31 01:28:55 -0500177 $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o
Deepak Kodihalli557dfb02019-05-12 13:11:17 +0530178 $(PHOSPHOR_LOGGING_LIBS) \
179 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
180 $(SDBUSPLUS_LIBS) \
181 $(CODE_COVERAGE_LIBS) \
182 -lstdc++fs
183libpldmresponder_platform_test_SOURCES = libpldmresponder_platform_test.cpp