blob: ca75b4721cedf22f9a9fd4944b7610a4e8d25d26 [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 \
10 libpldmresponder_bios_test
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060011
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053012if OEM_IBM
13check_PROGRAMS += \
14 libpldmoem_fileio_test \
15 libpldmoemresponder_fileio_test
16endif
17
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060018test_cppflags = \
19 -Igtest \
20 $(GTEST_CPPFLAGS) \
21 $(AM_CPPFLAGS)
22
23test_cxxflags = \
Priyangafb4bec92019-03-25 11:51:31 +053024 $(PTHREAD_CFLAGS) \
25 $(CODE_COVERAGE_CXXFLAGS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060026
27test_ldflags = \
28 -lgtest_main \
29 -lgtest \
30 $(PTHREAD_LIBS) \
31 $(OESDK_TESTCASE_FLAGS)
32
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053033if OEM_IBM
34test_ldflags += \
35 $(SDBUSPLUS_LIBS) \
36 -lgmock \
37 -lstdc++fs
38endif
39
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060040libpldm_base_test_CPPFLAGS = $(test_cppflags)
41libpldm_base_test_CXXFLAGS = $(test_cxxflags)
42libpldm_base_test_LDFLAGS = $(test_ldflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050043libpldm_base_test_LDADD = \
44 $(top_builddir)/libpldm/libpldm_la-base.o \
45 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060046libpldm_base_test_SOURCES = libpldm_base_test.cpp
47
Sampa Misra0db1dfa2019-03-19 00:15:31 -050048libpldm_platform_test_CPPFLAGS = $(test_cppflags)
49libpldm_platform_test_CXXFLAGS = $(test_cxxflags)
50libpldm_platform_test_LDFLAGS = $(test_ldflags)
51libpldm_platform_test_LDADD = \
52 $(top_builddir)/libpldm/libpldm_la-platform.o \
53 $(top_builddir)/libpldm/libpldm_la-base.o \
54 $(CODE_COVERAGE_LIBS)
55libpldm_platform_test_SOURCES = libpldm_platform_test.cpp
56
Sampa Misra032bd502019-03-06 05:03:22 -060057libpldm_bios_test_CPPFLAGS = $(test_cppflags)
58libpldm_bios_test_CXXFLAGS = $(test_cxxflags)
59libpldm_bios_test_LDFLAGS = $(test_ldflags)
60libpldm_bios_test_LDADD = \
61 $(top_builddir)/libpldm/libpldm_la-base.o \
62 $(top_builddir)/libpldm/libpldm_la-bios.o \
63 $(CODE_COVERAGE_LIBS)
64libpldm_bios_test_SOURCES = libpldm_bios_test.cpp
65
66libpldmresponder_bios_test_CPPFLAGS = $(test_cppflags)
67libpldmresponder_bios_test_CXXFLAGS = $(test_cxxflags)
Deepak Kodihallia0386242019-04-25 07:27:18 -050068libpldmresponder_bios_test_LDFLAGS = \
69 $(test_ldflags) \
70 $(SDBUSPLUS_LIBS)
Sampa Misra032bd502019-03-06 05:03:22 -060071libpldmresponder_bios_test_LDADD = \
72 $(top_builddir)/libpldmresponder/libpldmresponder_la-bios.o \
73 $(top_builddir)/libpldmresponder/libpldmresponder_la-utils.o \
74 $(top_builddir)/libpldm/libpldm_la-base.o \
75 $(top_builddir)/libpldm/libpldm_la-bios.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050076 $(CODE_COVERAGE_LIBS) \
77 $(SDBUSPLUS_LIBS)
Sampa Misra032bd502019-03-06 05:03:22 -060078libpldmresponder_bios_test_SOURCES = \
79 libpldmresponder_bios_test.cpp
80
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060081libpldmresponder_base_test_CPPFLAGS = $(test_cppflags)
82libpldmresponder_base_test_CXXFLAGS = $(test_cxxflags)
83libpldmresponder_base_test_LDFLAGS = $(test_ldflags)
84libpldmresponder_base_test_LDADD = \
Priyangafb4bec92019-03-25 11:51:31 +053085 $(top_builddir)/libpldm/libpldm_la-base.o \
Deepak Kodihallia0386242019-04-25 07:27:18 -050086 $(top_builddir)/libpldmresponder/libpldmresponder_la-base.o \
87 $(CODE_COVERAGE_LIBS)
Deepak Kodihalli1b24f972019-02-01 04:09:13 -060088libpldmresponder_base_test_SOURCES = libpldmresponder_base_test.cpp
Jinu Joy Thomas7f57f442019-06-13 20:38:49 +053089
90if OEM_IBM
91libpldmoem_fileio_test_CPPFLAGS = $(test_cppflags) \
92 -I$(top_builddir)/oem/ibm/ \
93 -I$(top_builddir)/libpldm/
94libpldmoem_fileio_test_CXXFLAGS = $(test_cxxflags)
95libpldmoem_fileio_test_LDFLAGS = $(test_ldflags)
96libpldmoem_fileio_test_LDADD = \
97 $(top_builddir)/libpldm/libpldm_la-base.o \
98 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o
99libpldmoem_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldm_fileio_test.cpp
100
101libpldmoemresponder_fileio_test_CPPFLAGS = $(test_cppflags) \
102 -I$(top_builddir)/oem/ibm/ \
103 -I$(top_builddir)/libpldm/
104libpldmoemresponder_fileio_test_CXXFLAGS = $(test_cxxflags)
105libpldmoemresponder_fileio_test_LDFLAGS = $(test_ldflags)
106libpldmoemresponder_fileio_test_LDADD = \
107 $(top_builddir)/libpldm/libpldm_la-base.o \
108 $(top_builddir)/oem/ibm/libpldm/libpldm_la-file_io.o \
109 $(top_builddir)/oem/ibm/libpldmresponder/libpldmresponder_la-file_io.o
110libpldmoemresponder_fileio_test_SOURCES = $(top_builddir)/oem/ibm/test/libpldmresponder_fileio_test.cpp
111endif
112