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 | |
| 29 | # Build/add sample_unittest to test suite |
Patrick Williams | c0c1967 | 2016-11-04 17:37:27 -0500 | [diff] [blame] | 30 | sample_unittest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS) |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 31 | sample_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) \ |
| 32 | $(CODE_COVERAGE_CFLAGS) |
Vernon Mauery | ebe8e90 | 2018-12-12 09:39:22 -0800 | [diff] [blame] | 33 | sample_unittest_LDFLAGS = -lgtest_main -lgtest -pthread $(OESDK_TESTCASE_FLAGS) \ |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 34 | $(CODE_COVERAGE_LDFLAGS) |
| 35 | sample_unittest_SOURCES = %reldir%/sample_unittest.cpp |
Matthew Barth | 00b1e5b | 2016-09-09 12:15:46 -0500 | [diff] [blame] | 36 | sample_unittest_LDADD = $(top_builddir)/sample.o |
Emily Shaffer | c07e72c | 2018-06-18 10:37:31 -0700 | [diff] [blame] | 37 | check_PROGRAMS += %reldir%/sample_unittest |
Peter Hanson | 4a58985 | 2017-06-07 17:40:45 -0700 | [diff] [blame] | 38 | |
| 39 | # Build/add oemrouter_unittest to test suite |
Patrick Venture | 79c7c85 | 2018-07-25 13:10:25 -0700 | [diff] [blame] | 40 | # Issue #3325 |
| 41 | #check_PROGRAMS += oemrouter_unittest |
| 42 | #oemrouter_unittest_SOURCES = oemrouter_unittest.cpp |
| 43 | #oemrouter_unittest_LDADD = $(top_builddir)/oemrouter.o |
Vernon Mauery | ebe8e90 | 2018-12-12 09:39:22 -0800 | [diff] [blame] | 44 | |
| 45 | # Build/add message packing/unpacking unit tests |
| 46 | message_unittest_CPPFLAGS = \ |
| 47 | -Igtest \ |
| 48 | $(GTEST_CPPFLAGS) \ |
| 49 | $(AM_CPPFLAGS) |
| 50 | message_unittest_CXXFLAGS = \ |
| 51 | $(COMMON_CXX) \ |
| 52 | $(PTHREAD_CFLAGS) \ |
| 53 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 54 | $(CODE_COVERAGE_CXXFLAGS) \ |
| 55 | $(CODE_COVERAGE_CFLAGS) |
| 56 | message_unittest_LDFLAGS = \ |
| 57 | -lgtest_main \ |
| 58 | -lgtest \ |
| 59 | -lsdbusplus \ |
| 60 | -lsystemd \ |
| 61 | -pthread \ |
| 62 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 63 | $(OESDK_TESTCASE_FLAGS) \ |
| 64 | $(CODE_COVERAGE_LDFLAGS) |
| 65 | message_unittest_SOURCES = \ |
| 66 | %reldir%/message/payload.cpp \ |
| 67 | %reldir%/message/unpack.cpp \ |
| 68 | %reldir%/message/pack.cpp |
| 69 | check_PROGRAMS += %reldir%/message_unittest |