blob: 0faeda7739e06b103fdf60605f415a2912f9d495 [file] [log] [blame]
Vernon Maueryebe8e902018-12-12 09:39:22 -08001COMMON_CXX = \
2 -flto \
3 -Wno-psabi \
4 $(SDBUSPLUS_CFLAGS) \
5 $(SYSTEMD_CFLAGS) \
6 $(libmapper_CFLAGS) \
7 $(SDBUSPLUS_CFLAGS) \
8 $(PHOSPHOR_LOGGING_CFLAGS) \
9 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
10 -DBOOST_ERROR_CODE_HEADER_ONLY \
11 -DBOOST_SYSTEM_NO_DEPRECATED \
12 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
13 -DBOOST_ASIO_DISABLE_THREADS \
14 -DBOOST_ALL_NO_LIB
15
16AM_CPPFLAGS = \
17 -I$(top_srcdir) \
18 -I$(top_srcdir)/include \
19 $(CODE_COVERAGE_CPPFLAGS) \
20 $(GTEST_CFLAGS)
Emily Shafferc07e72c2018-06-18 10:37:31 -070021AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
Peter Hanson4a589852017-06-07 17:40:45 -070022AM_CXXFLAGS = $(GTEST_MAIN_CFLAGS) $(GTEST_CFLAGS)
23AM_LDFLAGS = $(GTEST_MAIN_LIBS) $(OESDK_TESTCASE_FLAGS)
Matthew Barth00b1e5b2016-09-09 12:15:46 -050024
25# Run all 'check' test programs
Peter Hanson4a589852017-06-07 17:40:45 -070026check_PROGRAMS =
Matthew Barth00b1e5b2016-09-09 12:15:46 -050027TESTS = $(check_PROGRAMS)
28
Patrick Venture02e32372019-08-16 10:50:18 -070029entitymap_json_unittest_SOURCES = entitymap_json_unittest.cpp
Patrick Venture1ad9da82019-08-19 12:25:54 -070030entitymap_json_unittest_LDADD = $(top_builddir)/entity_map_json.o -lgmock
Patrick Venture02e32372019-08-16 10:50:18 -070031
32check_PROGRAMS += entitymap_json_unittest
33
Matthew Barth00b1e5b2016-09-09 12:15:46 -050034# Build/add sample_unittest to test suite
Patrick Williamsc0c19672016-11-04 17:37:27 -050035sample_unittest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
Emily Shafferc07e72c2018-06-18 10:37:31 -070036sample_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) \
37 $(CODE_COVERAGE_CFLAGS)
Vernon Maueryebe8e902018-12-12 09:39:22 -080038sample_unittest_LDFLAGS = -lgtest_main -lgtest -pthread $(OESDK_TESTCASE_FLAGS) \
Emily Shafferc07e72c2018-06-18 10:37:31 -070039 $(CODE_COVERAGE_LDFLAGS)
40sample_unittest_SOURCES = %reldir%/sample_unittest.cpp
Matthew Barth00b1e5b2016-09-09 12:15:46 -050041sample_unittest_LDADD = $(top_builddir)/sample.o
Emily Shafferc07e72c2018-06-18 10:37:31 -070042check_PROGRAMS += %reldir%/sample_unittest
Peter Hanson4a589852017-06-07 17:40:45 -070043
44# Build/add oemrouter_unittest to test suite
Patrick Venture79c7c852018-07-25 13:10:25 -070045# Issue #3325
46#check_PROGRAMS += oemrouter_unittest
47#oemrouter_unittest_SOURCES = oemrouter_unittest.cpp
48#oemrouter_unittest_LDADD = $(top_builddir)/oemrouter.o
Vernon Maueryebe8e902018-12-12 09:39:22 -080049
50# Build/add message packing/unpacking unit tests
51message_unittest_CPPFLAGS = \
52 -Igtest \
53 $(GTEST_CPPFLAGS) \
54 $(AM_CPPFLAGS)
55message_unittest_CXXFLAGS = \
56 $(COMMON_CXX) \
57 $(PTHREAD_CFLAGS) \
58 $(PHOSPHOR_LOGGING_CFLAGS) \
59 $(CODE_COVERAGE_CXXFLAGS) \
60 $(CODE_COVERAGE_CFLAGS)
61message_unittest_LDFLAGS = \
62 -lgtest_main \
63 -lgtest \
64 -lsdbusplus \
65 -lsystemd \
66 -pthread \
67 $(PHOSPHOR_LOGGING_LIBS) \
68 $(OESDK_TESTCASE_FLAGS) \
69 $(CODE_COVERAGE_LDFLAGS)
70message_unittest_SOURCES = \
71 %reldir%/message/payload.cpp \
72 %reldir%/message/unpack.cpp \
73 %reldir%/message/pack.cpp
74check_PROGRAMS += %reldir%/message_unittest
Rajashekar Gade Reddye7023922019-07-10 16:54:55 +000075
76# Build/add closesession_unittest to test suite
77session_unittest_CPPFLAGS = \
78 -Igtest \
79 $(GTEST_CPPFLAGS) \
80 $(AM_CPPFLAGS)
81session_unittest_CXXFLAGS = \
82 $(PTHREAD_CFLAGS) \
83 $(CODE_COVERAGE_CXXFLAGS) \
84 $(CODE_COVERAGE_CFLAGS)
85session_unittest_LDFLAGS = \
86 -lgtest_main \
87 -lgtest \
88 -pthread \
89 $(OESDK_TESTCASE_FLAGS) \
90 $(CODE_COVERAGE_LDFLAGS)
91session_unittest_SOURCES = %reldir%/session/closesession_unittest.cpp
92check_PROGRAMS += %reldir%/session_unittest