blob: 4b0accaf2d135ae41684948d0393c65e12cfa185 [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 \
12 libpldmresponder_bios_table_test
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060013
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053014if OEM_IBM
15check_PROGRAMS += \
16 libpldmoem_fileio_test \
17 libpldmoemresponder_fileio_test
18endif
19
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060020test_cppflags = \
21 -Igtest \
22 $(GTEST_CPPFLAGS) \
23 $(AM_CPPFLAGS)
24
25test_cxxflags = \
Priyangafb4bec92019-03-25 11:51:31 +053026 $(PTHREAD_CFLAGS) \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050027 $(PHOSPHOR_LOGGING_CFLAGS) \
28 $(SDBUSPLUS_CFLAGS) \
Priyangafb4bec92019-03-25 11:51:31 +053029 $(CODE_COVERAGE_CXXFLAGS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060030
31test_ldflags = \
32 -lgtest_main \
33 -lgtest \
34 $(PTHREAD_LIBS) \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050035 $(SDBUSPLUS_LIBS) \
36 $(PHOSPHOR_LOGGING_LIBS) \
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060037 $(OESDK_TESTCASE_FLAGS)
38
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053039if OEM_IBM
40test_ldflags += \
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053041 -lgmock \
42 -lstdc++fs
43endif
44
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060045libpldm_base_test_CPPFLAGS = $(test_cppflags)
46libpldm_base_test_CXXFLAGS = $(test_cxxflags)
47libpldm_base_test_LDFLAGS = $(test_ldflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050048libpldm_base_test_LDADD = \
49 $(top_builddir)/libpldm/libpldm_la-base.o \
50 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060051libpldm_base_test_SOURCES = libpldm_base_test.cpp
52
Sampa Misra0db1dfa2019-03-19 00:15:31 -050053libpldm_platform_test_CPPFLAGS = $(test_cppflags)
54libpldm_platform_test_CXXFLAGS = $(test_cxxflags)
55libpldm_platform_test_LDFLAGS = $(test_ldflags)
56libpldm_platform_test_LDADD = \
57 $(top_builddir)/libpldm/libpldm_la-platform.o \
58 $(top_builddir)/libpldm/libpldm_la-base.o \
59 $(CODE_COVERAGE_LIBS)
60libpldm_platform_test_SOURCES = libpldm_platform_test.cpp
61
Sampa Misra032bd502019-03-06 05:03:22 -060062libpldm_bios_test_CPPFLAGS = $(test_cppflags)
63libpldm_bios_test_CXXFLAGS = $(test_cxxflags)
64libpldm_bios_test_LDFLAGS = $(test_ldflags)
65libpldm_bios_test_LDADD = \
66 $(top_builddir)/libpldm/libpldm_la-base.o \
67 $(top_builddir)/libpldm/libpldm_la-bios.o \
68 $(CODE_COVERAGE_LIBS)
69libpldm_bios_test_SOURCES = libpldm_bios_test.cpp
70
71libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags)
72libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050073libpldmresponder_bios_test_LDFLAGS = \
74 $(test_ldflags) \
Sampa Misrab37be312019-07-03 02:26:41 -050075 $(SDBUSPLUS_LIBS) \
76 -lstdc++fs
Sampa Misra032bd502019-03-06 05:03:22 -060077libpldmresponder_bios_test_LDADD = \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050078 $(top_builddir)/pldmd-registration.o \
Sampa Misra032bd502019-03-06 05:03:22 -060079 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
80 $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
Sampa Misrab37be312019-07-03 02:26:41 -050081 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_table.o \
Sampa Misra032bd502019-03-06 05:03:22 -060082 $(top_builddir)/libpldm/libpldm_la-base.o \
83 $(top_builddir)/libpldm/libpldm_la-bios.o \
Sampa Misrab37be312019-07-03 02:26:41 -050084 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios_parser.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050085 $(CODE_COVERAGE_LIBS) \
Sampa Misrab37be312019-07-03 02:26:41 -050086 $(PHOSPHOR_LOGGING_LIBS) \
87 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
88 $(SDBUSPLUS_LIBS) \
89 -lstdc++fs
Sampa Misra032bd502019-03-06 05:03:22 -060090libpldmresponder_bios_test_SOURCES = \
91 libpldmresponder_bios_test.cpp
92
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060093libpldmresponder_base_test_CPPFLAGS = $(test_cppflags)
94libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags)
95libpldmresponder_base_test_LDFLAGS = $(test_ldflags)
96libpldmresponder_base_test_LDADD = \
Jinu Joy Thomasf666db12019-05-29 05:22:31 -050097 $(top_builddir)/pldmd-registration.o \
Priyangafb4bec92019-03-25 11:51:31 +053098 $(top_builddir)/libpldm/libpldm_la-base.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050099 $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \
100 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -0600101libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530102
103if OEM_IBM
104libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \
105 -I$(top_builddir)/oem/ibm/ \
106 -I$(top_builddir)/libpldm/
107libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags)
108libpldmoem_fileio_test_LDFLAGS = $(test_ldflags)
109libpldmoem_fileio_test_LDADD = \
110 $(top_builddir)/libpldm/libpldm_la-base.o \
111 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o
112libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp
113
114libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \
115 -I$(top_builddir)/oem/ibm/ \
116 -I$(top_builddir)/libpldm/
117libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags)
118libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags)
119libpldmoemresponder_fileio_test_LDADD = \
Sampa Misrab37be312019-07-03 02:26:41 -0500120 $(top_builddir)/pldmd-registration.o \
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530121 $(top_builddir)/libpldm/libpldm_la-base.o \
122 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \
Tom Joseph0c6d22c2019-06-26 09:58:41 +0530123 $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o\
124 $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_table.o
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +0530125libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp
126endif
127
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -0500128libpldmresponder_pdr_state_effecter_test_CPPFLAGS = $(test_cppflags)
129libpldmresponder_pdr_state_effecter_test_CXXFLAGS = $(test_cxxflags)
130libpldmresponder_pdr_state_effecter_test_LDFLAGS = $(test_ldflags)
131libpldmresponder_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
139libpldmresponder_pdr_state_effecter_test_SOURCES = libpldmresponder_pdr_state_effecter_test.cpp
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530140
141libpldmresponder_bios_table_test_CPPFLAGS = $(test_cppflags)
142libpldmresponder_bios_table_test_CXXFLAGS = $(test_cxxflags)
143libpldmresponder_bios_table_test_LDFLAGS = \
Sampa Misrab37be312019-07-03 02:26:41 -0500144 $(test_ldflags) \
145 $(SDBUSPLUS_LIBS)
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530146libpldmresponder_bios_table_test_LDADD = \
Sampa Misrab37be312019-07-03 02:26:41 -0500147 $(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 Kodihallicb7f2d42019-06-19 13:25:31 +0530153 $(top_builddir)/pldmd-registration.o \
Sampa Misrab37be312019-07-03 02:26:41 -0500154 $(CODE_COVERAGE_LIBS) \
155 $(SDBUSPLUS_LIBS) \
156 $(PHOSPHOR_LOGGING_LIBS) \
157 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Deepak Kodihallicb7f2d42019-06-19 13:25:31 +0530158 -lstdc++fs
159libpldmresponder_bios_table_test_SOURCES = \
160 libpldmresponder_bios_table_test.cpp