blob: 3dfae00b042a508b6bf707993fd719a57c3c770e [file] [log] [blame]
Patrick Venture94feffa2019-03-06 09:54:49 -08001@CODE_COVERAGE_RULES@
2
Patrick Venture90f9bb52019-03-06 09:39:11 -08003AM_CPPFLAGS = \
4 -I$(top_srcdir)/ \
5 $(GTEST_CFLAGS) \
6 $(GMOCK_CFLAGS) \
Patrick Venture7a841b62018-06-13 09:39:46 -07007 $(SDBUSPLUS_CFLAGS) \
Patrick Venture4cf39862018-12-06 10:24:44 -08008 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
Patrick Venture94feffa2019-03-06 09:54:49 -08009 $(PHOSPHOR_LOGGING_CFLAGS) \
10 $(CODE_COVERAGE_CPPFLAGS)
11AM_CFLAGS = \
12 $(CODE_COVERAGE_CFLAGS)
13AM_CXXFLAGS = \
14 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venture2e3ecb52018-06-22 08:18:19 -070015AM_LDFLAGS = \
Patrick Venture90f9bb52019-03-06 09:39:11 -080016 $(GTEST_LIBS) \
Patrick Venture7a841b62018-06-13 09:39:46 -070017 $(GMOCK_LIBS) \
Patrick Venture90f9bb52019-03-06 09:39:11 -080018 -lgmock_main \
Patrick Venture7a841b62018-06-13 09:39:46 -070019 $(OESDK_TESTCASE_FLAGS) \
20 $(SDBUSPLUS_LIBS) \
Patrick Venture4cf39862018-12-06 10:24:44 -080021 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Patrick Venture94feffa2019-03-06 09:54:49 -080022 $(PHOSPHOR_LOGGING_LIBS) \
23 $(CODE_COVERAGE_LIBS)
Patrick Venture7a841b62018-06-13 09:39:46 -070024
25# Run all 'check' test programs
Patrick Venture1fa9aab2018-06-11 10:46:49 -070026check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \
Patrick Venture3349ef22018-06-12 14:09:29 -070027 sensor_host_unittest util_unittest pid_zone_unittest \
Patrick Venture0ef1faf2018-06-13 12:50:53 -070028 pid_thermalcontroller_unittest pid_fancontroller_unittest \
James Feist3dfaafd2018-09-20 15:46:58 -070029 pid_stepwisecontroller_unittest \
Patrick Ventureeeeb8672019-02-08 11:47:42 -080030 dbus_passive_unittest dbus_active_unittest \
Patrick Venture5426c342019-02-11 12:03:30 -080031 sensors_json_unittest pid_json_unittest json_parse_unittest
Patrick Venture7a841b62018-06-13 09:39:46 -070032TESTS = $(check_PROGRAMS)
Patrick Venturefe75b192018-06-08 11:19:43 -070033
34# Until libconfig is mocked out or replaced, include it.
35sensor_manager_unittest_SOURCES = sensor_manager_unittest.cpp
36sensor_manager_unittest_LDADD = $(top_builddir)/sensors/manager.o
Patrick Venturee31ee6d2018-06-08 18:49:27 -070037
38sensor_pluggable_unittest_SOURCES = sensor_pluggable_unittest.cpp
39sensor_pluggable_unittest_LDADD = $(top_builddir)/sensors/pluggable.o
Patrick Venture1fa9aab2018-06-11 10:46:49 -070040
41sensor_host_unittest_SOURCES = sensor_host_unittest.cpp
42sensor_host_unittest_LDADD = $(top_builddir)/sensors/host.o
Patrick Ventureda064282018-06-12 19:33:47 -070043
44util_unittest_SOURCES = util_unittest.cpp
45util_unittest_LDADD = $(top_builddir)/util.o
Patrick Venturea58197c2018-06-11 15:29:45 -070046
47pid_zone_unittest_SOURCES = pid_zone_unittest.cpp
48pid_zone_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
James Feist22c257a2018-08-31 14:07:12 -070049 $(top_builddir)/sensors/manager.o $(top_builddir)/pid/pidcontroller.o \
Patrick Venturec32e3fc2019-02-28 10:01:11 -080050 $(top_builddir)/pid/zone.o $(top_builddir)/pid/tuning.o
Patrick Venture3349ef22018-06-12 14:09:29 -070051
52pid_thermalcontroller_unittest_SOURCES = pid_thermalcontroller_unittest.cpp
53pid_thermalcontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
James Feist22c257a2018-08-31 14:07:12 -070054 $(top_builddir)/pid/util.o $(top_builddir)/pid/pidcontroller.o \
Patrick Venture3349ef22018-06-12 14:09:29 -070055 $(top_builddir)/pid/thermalcontroller.o
Patrick Venture566a1512018-06-12 14:51:07 -070056
James Feist3dfaafd2018-09-20 15:46:58 -070057pid_stepwisecontroller_unittest_SOURCES = pid_stepwisecontroller_unittest.cpp
58pid_stepwisecontroller_unittest_LDADD = $(top_builddir)/pid/ec/stepwise.o \
59 $(top_builddir)/pid/util.o $(top_builddir)/pid/stepwisecontroller.o
60
Patrick Venture566a1512018-06-12 14:51:07 -070061pid_fancontroller_unittest_SOURCES = pid_fancontroller_unittest.cpp
62pid_fancontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
James Feist22c257a2018-08-31 14:07:12 -070063 $(top_builddir)/pid/util.o $(top_builddir)/pid/pidcontroller.o \
Patrick Venturec32e3fc2019-02-28 10:01:11 -080064 $(top_builddir)/pid/fancontroller.o $(top_builddir)/pid/tuning.o
Patrick Venture0ef1faf2018-06-13 12:50:53 -070065
66dbus_passive_unittest_SOURCES = dbus_passive_unittest.cpp
67dbus_passive_unittest_LDADD = $(top_builddir)/dbus/util.o \
68 $(top_builddir)/dbus/dbuspassive.o
Patrick Venture25243232018-06-14 10:34:34 -070069
70dbus_active_unittest_SOURCES = dbus_active_unittest.cpp
71dbus_active_unittest_LDADD = $(top_builddir)/dbus/dbusactiveread.o
Patrick Ventureeeeb8672019-02-08 11:47:42 -080072
73sensors_json_unittest_SOURCES = sensors_json_unittest.cpp
74sensors_json_unittest_LDADD = $(top_builddir)/sensors/buildjson.o
Patrick Ventured1491722019-02-08 14:37:45 -080075
76pid_json_unittest_SOURCES = pid_json_unittest.cpp
77pid_json_unittest_LDADD = $(top_builddir)/pid/buildjson.o
Patrick Venture5426c342019-02-11 12:03:30 -080078
79json_parse_unittest_SOURCES = json_parse_unittest.cpp
80json_parse_unittest_LDADD = $(top_builddir)/build/buildjson.o