Vernon Mauery | ebe8e90 | 2018-12-12 09:39:22 -0800 | [diff] [blame] | 1 | COMMON_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 | |
| 16 | AM_CPPFLAGS = \ |
| 17 | -I$(top_srcdir) \ |
| 18 | -I$(top_srcdir)/include \ |
| 19 | $(CODE_COVERAGE_CPPFLAGS) \ |
| 20 | $(GTEST_CFLAGS) |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 21 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) |
Peter Hanson | 4a58985 | 2017-06-07 17:40:45 -0700 | [diff] [blame] | 22 | AM_CXXFLAGS = $(GTEST_MAIN_CFLAGS) $(GTEST_CFLAGS) |
| 23 | AM_LDFLAGS = $(GTEST_MAIN_LIBS) $(OESDK_TESTCASE_FLAGS) |
Matthew Barth | 00b1e5b | 2016-09-09 12:15:46 -0500 | [diff] [blame] | 24 | |
| 25 | # Run all 'check' test programs |
Peter Hanson | 4a58985 | 2017-06-07 17:40:45 -0700 | [diff] [blame] | 26 | check_PROGRAMS = |
Matthew Barth | 00b1e5b | 2016-09-09 12:15:46 -0500 | [diff] [blame] | 27 | TESTS = $(check_PROGRAMS) |
| 28 | |
Patrick Venture | 02e3237 | 2019-08-16 10:50:18 -0700 | [diff] [blame] | 29 | entitymap_json_unittest_SOURCES = entitymap_json_unittest.cpp |
Patrick Venture | 1ad9da8 | 2019-08-19 12:25:54 -0700 | [diff] [blame] | 30 | entitymap_json_unittest_LDADD = $(top_builddir)/entity_map_json.o -lgmock |
Patrick Venture | 02e3237 | 2019-08-16 10:50:18 -0700 | [diff] [blame] | 31 | |
| 32 | check_PROGRAMS += entitymap_json_unittest |
| 33 | |
Matthew Barth | 00b1e5b | 2016-09-09 12:15:46 -0500 | [diff] [blame] | 34 | # Build/add sample_unittest to test suite |
Patrick Williams | c0c1967 | 2016-11-04 17:37:27 -0500 | [diff] [blame] | 35 | sample_unittest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS) |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 36 | sample_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) \ |
| 37 | $(CODE_COVERAGE_CFLAGS) |
Vernon Mauery | ebe8e90 | 2018-12-12 09:39:22 -0800 | [diff] [blame] | 38 | sample_unittest_LDFLAGS = -lgtest_main -lgtest -pthread $(OESDK_TESTCASE_FLAGS) \ |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 39 | $(CODE_COVERAGE_LDFLAGS) |
| 40 | sample_unittest_SOURCES = %reldir%/sample_unittest.cpp |
Matthew Barth | 00b1e5b | 2016-09-09 12:15:46 -0500 | [diff] [blame] | 41 | sample_unittest_LDADD = $(top_builddir)/sample.o |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 42 | check_PROGRAMS += %reldir%/sample_unittest |
Peter Hanson | 4a58985 | 2017-06-07 17:40:45 -0700 | [diff] [blame] | 43 | |
| 44 | # Build/add oemrouter_unittest to test suite |
Patrick Venture | 79c7c85 | 2018-07-25 13:10:25 -0700 | [diff] [blame] | 45 | # Issue #3325 |
| 46 | #check_PROGRAMS += oemrouter_unittest |
| 47 | #oemrouter_unittest_SOURCES = oemrouter_unittest.cpp |
| 48 | #oemrouter_unittest_LDADD = $(top_builddir)/oemrouter.o |
Vernon Mauery | ebe8e90 | 2018-12-12 09:39:22 -0800 | [diff] [blame] | 49 | |
| 50 | # Build/add message packing/unpacking unit tests |
| 51 | message_unittest_CPPFLAGS = \ |
| 52 | -Igtest \ |
| 53 | $(GTEST_CPPFLAGS) \ |
| 54 | $(AM_CPPFLAGS) |
| 55 | message_unittest_CXXFLAGS = \ |
| 56 | $(COMMON_CXX) \ |
| 57 | $(PTHREAD_CFLAGS) \ |
| 58 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 59 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 60 | $(CODE_COVERAGE_CFLAGS) |
| 61 | message_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) |
| 70 | message_unittest_SOURCES = \ |
| 71 | %reldir%/message/payload.cpp \ |
| 72 | %reldir%/message/unpack.cpp \ |
| 73 | %reldir%/message/pack.cpp |
| 74 | check_PROGRAMS += %reldir%/message_unittest |
Rajashekar Gade Reddy | e702392 | 2019-07-10 16:54:55 +0000 | [diff] [blame] | 75 | |
| 76 | # Build/add closesession_unittest to test suite |
| 77 | session_unittest_CPPFLAGS = \ |
| 78 | -Igtest \ |
| 79 | $(GTEST_CPPFLAGS) \ |
| 80 | $(AM_CPPFLAGS) |
| 81 | session_unittest_CXXFLAGS = \ |
| 82 | $(PTHREAD_CFLAGS) \ |
| 83 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 84 | $(CODE_COVERAGE_CFLAGS) |
| 85 | session_unittest_LDFLAGS = \ |
| 86 | -lgtest_main \ |
| 87 | -lgtest \ |
| 88 | -pthread \ |
| 89 | $(OESDK_TESTCASE_FLAGS) \ |
| 90 | $(CODE_COVERAGE_LDFLAGS) |
| 91 | session_unittest_SOURCES = %reldir%/session/closesession_unittest.cpp |
| 92 | check_PROGRAMS += %reldir%/session_unittest |