blob: 42663a13a662b25e38b3ddfb4cafe284b6e8f366 [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 \
11 libpldmresponder_pdr_state_effecter_test
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060012
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053013if OEM_IBM
14check_PROGRAMS += \
15 libpldmoem_fileio_test \
16 libpldmoemresponder_fileio_test
17endif
18
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060019test_cppflags = \
20 -Igtest \
21 $(GTEST_CPPFLAGS) \
22 $(AM_CPPFLAGS)
23
24test_cxxflags = \
Priyangafb4bec92019-03-25 11:51:31 +053025 $(PTHREAD_CFLAGS) \
26 $(CODE_COVERAGE_CXXFLAGS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060027
28test_ldflags = \
29 -lgtest_main \
30 -lgtest \
31 $(PTHREAD_LIBS) \
32 $(OESDK_TESTCASE_FLAGS)
33
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053034if OEM_IBM
35test_ldflags += \
36 $(SDBUSPLUS_LIBS) \
37 -lgmock \
38 -lstdc++fs
39endif
40
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060041libpldm_base_test_CPPFLAGS = $(test_cppflags)
42libpldm_base_test_CXXFLAGS = $(test_cxxflags)
43libpldm_base_test_LDFLAGS = $(test_ldflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050044libpldm_base_test_LDADD = \
45 $(top_builddir)/libpldm/libpldm_la-base.o \
46 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060047libpldm_base_test_SOURCES = libpldm_base_test.cpp
48
Sampa Misra0db1dfa2019-03-19 00:15:31 -050049libpldm_platform_test_CPPFLAGS = $(test_cppflags)
50libpldm_platform_test_CXXFLAGS = $(test_cxxflags)
51libpldm_platform_test_LDFLAGS = $(test_ldflags)
52libpldm_platform_test_LDADD = \
53 $(top_builddir)/libpldm/libpldm_la-platform.o \
54 $(top_builddir)/libpldm/libpldm_la-base.o \
55 $(CODE_COVERAGE_LIBS)
56libpldm_platform_test_SOURCES = libpldm_platform_test.cpp
57
Sampa Misra032bd502019-03-06 05:03:22 -060058libpldm_bios_test_CPPFLAGS = $(test_cppflags)
59libpldm_bios_test_CXXFLAGS = $(test_cxxflags)
60libpldm_bios_test_LDFLAGS = $(test_ldflags)
61libpldm_bios_test_LDADD = \
62 $(top_builddir)/libpldm/libpldm_la-base.o \
63 $(top_builddir)/libpldm/libpldm_la-bios.o \
64 $(CODE_COVERAGE_LIBS)
65libpldm_bios_test_SOURCES = libpldm_bios_test.cpp
66
67libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags)
68libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050069libpldmresponder_bios_test_LDFLAGS = \
70 $(test_ldflags) \
71 $(SDBUSPLUS_LIBS)
Sampa Misra032bd502019-03-06 05:03:22 -060072libpldmresponder_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 Kodihallia0386242019-04-25 07:27:18 -050077 $(CODE_COVERAGE_LIBS) \
78 $(SDBUSPLUS_LIBS)
Sampa Misra032bd502019-03-06 05:03:22 -060079libpldmresponder_bios_test_SOURCES = \
80 libpldmresponder_bios_test.cpp
81
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060082libpldmresponder_base_test_CPPFLAGS = $(test_cppflags)
83libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags)
84libpldmresponder_base_test_LDFLAGS = $(test_ldflags)
85libpldmresponder_base_test_LDADD = \
Priyangafb4bec92019-03-25 11:51:31 +053086 $(top_builddir)/libpldm/libpldm_la-base.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050087 $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \
88 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060089libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053090
91if OEM_IBM
92libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \
93 -I$(top_builddir)/oem/ibm/ \
94 -I$(top_builddir)/libpldm/
95libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags)
96libpldmoem_fileio_test_LDFLAGS = $(test_ldflags)
97libpldmoem_fileio_test_LDADD = \
98 $(top_builddir)/libpldm/libpldm_la-base.o \
99 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o
100libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp
101
102libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \
103 -I$(top_builddir)/oem/ibm/ \
104 -I$(top_builddir)/libpldm/
105libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags)
106libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags)
107libpldmoemresponder_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
111libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp
112endif
113
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -0500114libpldmresponder_pdr_state_effecter_test_CPPFLAGS = $(test_cppflags)
115libpldmresponder_pdr_state_effecter_test_CXXFLAGS = $(test_cxxflags)
116libpldmresponder_pdr_state_effecter_test_LDFLAGS = $(test_ldflags)
117libpldmresponder_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
125libpldmresponder_pdr_state_effecter_test_SOURCES = libpldmresponder_pdr_state_effecter_test.cpp