William A. Kennington III | 6c17d3d | 2018-06-19 18:34:43 -0700 | [diff] [blame] | 1 | @VALGRIND_CHECK_RULES@ |
Lei YU | 199b3b1 | 2019-09-25 17:58:41 +0800 | [diff] [blame] | 2 | VALGRIND_SUPPRESSIONS_FILES = valgrind.supp |
| 3 | |
William A. Kennington III | 592128c | 2018-06-19 18:34:17 -0700 | [diff] [blame] | 4 | |
Brad Bishop | 14275cf | 2016-11-10 16:24:48 -0500 | [diff] [blame] | 5 | if WANT_LIBSDBUSPLUS |
| 6 | |
William A. Kennington III | 809e373 | 2018-06-19 18:41:07 -0700 | [diff] [blame] | 7 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \ |
William A. Kennington III | c20acf6 | 2018-06-22 18:38:03 -0700 | [diff] [blame] | 8 | $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(SYSTEMD_CFLAGS) \ |
| 9 | $(CODE_COVERAGE_CPPFLAGS) |
William A. Kennington III | 592128c | 2018-06-19 18:34:17 -0700 | [diff] [blame] | 10 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) |
| 11 | AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) |
William A. Kennington III | 809e373 | 2018-06-19 18:41:07 -0700 | [diff] [blame] | 12 | test_ldadd = $(top_builddir)/libsdbusplus.la $(SYSTEMD_LIBS) \ |
William A. Kennington III | 592128c | 2018-06-19 18:34:17 -0700 | [diff] [blame] | 13 | $(OESDK_TESTCASE_FLAGS) $(CODE_COVERAGE_LIBS) |
Vernon Mauery | 7efcdae | 2018-09-06 06:34:39 -0700 | [diff] [blame] | 14 | gtest_ldadd = $(test_ldadd) $(GTEST_LIBS) $(GMOCK_LIBS) -lgmock_main -lpthread |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 15 | |
William A. Kennington III | 809e373 | 2018-06-19 18:41:07 -0700 | [diff] [blame] | 16 | check_PROGRAMS = |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 17 | TESTS = $(check_PROGRAMS) |
| 18 | |
Patrick Williams | b4041d4 | 2017-04-27 21:49:00 -0500 | [diff] [blame] | 19 | check_PROGRAMS += bus_list_names |
| 20 | bus_list_names_SOURCES = bus/list_names.cpp |
William A. Kennington III | 809e373 | 2018-06-19 18:41:07 -0700 | [diff] [blame] | 21 | bus_list_names_LDADD = $(gtest_ldadd) |
Patrick Williams | b4041d4 | 2017-04-27 21:49:00 -0500 | [diff] [blame] | 22 | |
Patrick Williams | faa89f2 | 2017-04-29 15:50:13 -0500 | [diff] [blame] | 23 | check_PROGRAMS += bus_match |
| 24 | bus_match_SOURCES = bus/match.cpp |
William A. Kennington III | 809e373 | 2018-06-19 18:41:07 -0700 | [diff] [blame] | 25 | bus_match_LDADD = $(gtest_ldadd) |
Patrick Williams | faa89f2 | 2017-04-29 15:50:13 -0500 | [diff] [blame] | 26 | |
William A. Kennington III | 874e82e | 2018-06-22 19:23:54 -0700 | [diff] [blame] | 27 | check_PROGRAMS += exception_sdbus_error |
| 28 | exception_sdbus_error_SOURCES = exception/sdbus_error.cpp |
| 29 | exception_sdbus_error_LDADD = $(gtest_ldadd) |
| 30 | |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 31 | check_PROGRAMS += message_append |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 32 | message_append_SOURCES = message/append.cpp |
William A. Kennington III | a1e9e2a | 2018-06-23 13:33:25 -0700 | [diff] [blame] | 33 | message_append_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 34 | |
| 35 | check_PROGRAMS += message_read |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 36 | message_read_SOURCES = message/read.cpp |
William A. Kennington III | b4b4fa1 | 2018-06-25 17:20:06 -0700 | [diff] [blame] | 37 | message_read_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 38 | |
Patrick Williams | 9db2864 | 2017-01-06 15:55:05 -0600 | [diff] [blame] | 39 | check_PROGRAMS += message_native_types |
| 40 | message_native_types_SOURCES = message/native_types.cpp |
Patrick Williams | 43b283a | 2017-05-01 14:15:54 -0500 | [diff] [blame] | 41 | message_native_types_LDADD = $(gtest_ldadd) |
Patrick Williams | 9db2864 | 2017-01-06 15:55:05 -0600 | [diff] [blame] | 42 | |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 43 | check_PROGRAMS += message_types |
| 44 | message_types_SOURCES = message/types.cpp |
Patrick Williams | 43b283a | 2017-05-01 14:15:54 -0500 | [diff] [blame] | 45 | message_types_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 46 | |
| 47 | check_PROGRAMS += utility_tuple_to_array |
| 48 | utility_tuple_to_array_SOURCES = utility/tuple_to_array.cpp |
Patrick Williams | 43b283a | 2017-05-01 14:15:54 -0500 | [diff] [blame] | 49 | utility_tuple_to_array_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 50 | |
| 51 | check_PROGRAMS += utility_type_traits |
| 52 | utility_type_traits_SOURCES = utility/type_traits.cpp |
William A. Kennington III | 977d4d4 | 2018-06-23 00:33:08 -0700 | [diff] [blame] | 53 | utility_type_traits_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 54 | |
| 55 | check_PROGRAMS += vtable_vtable |
| 56 | vtable_vtable_SOURCES = vtable/vtable.cpp vtable/vtable_c.c |
Patrick Williams | 43b283a | 2017-05-01 14:15:54 -0500 | [diff] [blame] | 57 | vtable_vtable_LDADD = $(gtest_ldadd) |
Patrick Williams | 83a9d0b | 2016-11-04 17:06:13 -0500 | [diff] [blame] | 58 | |
Vernon Mauery | 7efcdae | 2018-09-06 06:34:39 -0700 | [diff] [blame] | 59 | check_PROGRAMS += timer |
| 60 | timer_SOURCES = timer.cpp |
| 61 | timer_LDADD = $(gtest_ldadd) |
| 62 | |
Lei YU | e57c38e | 2019-09-20 17:38:17 +0800 | [diff] [blame] | 63 | server/Test/server.hpp: |
| 64 | @mkdir -p $(@D) |
| 65 | @top_srcdir@/tools/sdbus++ \ |
| 66 | -r $(srcdir) -t $(top_builddir)/tools/sdbusplus/templates \ |
| 67 | interface server-header server.Test > $@ |
| 68 | |
| 69 | server/Test/server.cpp: |
| 70 | @mkdir -p $(@D) |
| 71 | @top_srcdir@/tools/sdbus++ \ |
| 72 | -r $(srcdir) -t $(top_builddir)/tools/sdbusplus/templates \ |
| 73 | interface server-cpp server.Test > $@ |
| 74 | |
| 75 | server_test_generated_sources = server/Test/server.cpp server/Test/server.hpp |
| 76 | |
| 77 | BUILT_SOURCES = $(server_test_generated_sources) |
| 78 | CLEANFILES = $(server_test_generated_sources) |
| 79 | |
| 80 | check_PROGRAMS += object |
| 81 | object_SOURCES = server/object.cpp $(server_test_generated_sources) |
| 82 | object_LDADD = $(gtest_ldadd) |
| 83 | |
Brad Bishop | 14275cf | 2016-11-10 16:24:48 -0500 | [diff] [blame] | 84 | endif |