blob: 0c719492e75faaa87c5ff07d3030b16ab53ff36b [file] [log] [blame]
William A. Kennington III592128c2018-06-19 18:34:17 -07001@CODE_COVERAGE_RULES@
2
Brad Bishop14275cf2016-11-10 16:24:48 -05003if WANT_LIBSDBUSPLUS
4
William A. Kennington III809e3732018-06-19 18:41:07 -07005AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
William A. Kennington IIIc20acf62018-06-22 18:38:03 -07006 $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(SYSTEMD_CFLAGS) \
7 $(CODE_COVERAGE_CPPFLAGS)
William A. Kennington III592128c2018-06-19 18:34:17 -07008AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
9AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
William A. Kennington III809e3732018-06-19 18:41:07 -070010test_ldadd = $(top_builddir)/libsdbusplus.la $(SYSTEMD_LIBS) \
William A. Kennington III592128c2018-06-19 18:34:17 -070011 $(OESDK_TESTCASE_FLAGS) $(CODE_COVERAGE_LIBS)
William A. Kennington IIIc20acf62018-06-22 18:38:03 -070012gtest_ldadd = $(test_ldadd) $(GTEST_LIBS) $(GMOCK_LIBS) -lgmock_main
William A. Kennington III592128c2018-06-19 18:34:17 -070013legacy_test_cxxflags = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS)
William A. Kennington III809e3732018-06-19 18:41:07 -070014legacy_test_ldadd = $(test_ldadd) $(PTHREAD_LIBS)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050015
William A. Kennington III809e3732018-06-19 18:41:07 -070016check_PROGRAMS =
Patrick Williams83a9d0b2016-11-04 17:06:13 -050017TESTS = $(check_PROGRAMS)
18
Patrick Williamsb4041d42017-04-27 21:49:00 -050019check_PROGRAMS += bus_list_names
20bus_list_names_SOURCES = bus/list_names.cpp
William A. Kennington III809e3732018-06-19 18:41:07 -070021bus_list_names_LDADD = $(gtest_ldadd)
Patrick Williamsb4041d42017-04-27 21:49:00 -050022
Patrick Williamsfaa89f22017-04-29 15:50:13 -050023check_PROGRAMS += bus_match
24bus_match_SOURCES = bus/match.cpp
William A. Kennington III809e3732018-06-19 18:41:07 -070025bus_match_LDADD = $(gtest_ldadd)
Patrick Williamsfaa89f22017-04-29 15:50:13 -050026
Patrick Williams83a9d0b2016-11-04 17:06:13 -050027check_PROGRAMS += message_append
Patrick Williams83a9d0b2016-11-04 17:06:13 -050028message_append_SOURCES = message/append.cpp
William A. Kennington III809e3732018-06-19 18:41:07 -070029message_append_CXXFLAGS = $(legacy_test_cxxflags)
30message_append_LDADD = $(legacy_test_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050031
32check_PROGRAMS += message_read
Patrick Williams83a9d0b2016-11-04 17:06:13 -050033message_read_SOURCES = message/read.cpp
William A. Kennington III809e3732018-06-19 18:41:07 -070034message_read_CXXFLAGS = $(legacy_test_cxxflags)
35message_read_LDADD = $(legacy_test_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050036
Patrick Williams9db28642017-01-06 15:55:05 -060037check_PROGRAMS += message_native_types
38message_native_types_SOURCES = message/native_types.cpp
Patrick Williams43b283a2017-05-01 14:15:54 -050039message_native_types_LDADD = $(gtest_ldadd)
Patrick Williams9db28642017-01-06 15:55:05 -060040
Patrick Williams83a9d0b2016-11-04 17:06:13 -050041check_PROGRAMS += message_types
42message_types_SOURCES = message/types.cpp
Patrick Williams43b283a2017-05-01 14:15:54 -050043message_types_LDADD = $(gtest_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050044
45check_PROGRAMS += utility_tuple_to_array
46utility_tuple_to_array_SOURCES = utility/tuple_to_array.cpp
Patrick Williams43b283a2017-05-01 14:15:54 -050047utility_tuple_to_array_LDADD = $(gtest_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050048
49check_PROGRAMS += utility_type_traits
50utility_type_traits_SOURCES = utility/type_traits.cpp
William A. Kennington III809e3732018-06-19 18:41:07 -070051utility_type_traits_CXXFLAGS = $(legacy_test_cxxflags)
52utility_type_traits_LDADD = $(legacy_test_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050053
54check_PROGRAMS += vtable_vtable
55vtable_vtable_SOURCES = vtable/vtable.cpp vtable/vtable_c.c
Patrick Williams43b283a2017-05-01 14:15:54 -050056vtable_vtable_LDADD = $(gtest_ldadd)
Patrick Williams83a9d0b2016-11-04 17:06:13 -050057
Brad Bishop14275cf2016-11-10 16:24:48 -050058endif