Patrick Venture | 90f9bb5 | 2019-03-06 09:39:11 -0800 | [diff] [blame] | 1 | AM_CPPFLAGS = \ |
| 2 | -I$(top_srcdir)/ \ |
| 3 | $(GTEST_CFLAGS) \ |
| 4 | $(GMOCK_CFLAGS) \ |
Patrick Venture | 7a841b6 | 2018-06-13 09:39:46 -0700 | [diff] [blame] | 5 | $(SDBUSPLUS_CFLAGS) \ |
Patrick Venture | 4cf3986 | 2018-12-06 10:24:44 -0800 | [diff] [blame] | 6 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \ |
Patrick Venture | 94feffa | 2019-03-06 09:54:49 -0800 | [diff] [blame] | 7 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 8 | $(CODE_COVERAGE_CPPFLAGS) |
| 9 | AM_CFLAGS = \ |
| 10 | $(CODE_COVERAGE_CFLAGS) |
| 11 | AM_CXXFLAGS = \ |
| 12 | $(CODE_COVERAGE_CXXFLAGS) |
Patrick Venture | 2e3ecb5 | 2018-06-22 08:18:19 -0700 | [diff] [blame] | 13 | AM_LDFLAGS = \ |
Patrick Venture | 90f9bb5 | 2019-03-06 09:39:11 -0800 | [diff] [blame] | 14 | $(GTEST_LIBS) \ |
Patrick Venture | 7a841b6 | 2018-06-13 09:39:46 -0700 | [diff] [blame] | 15 | $(GMOCK_LIBS) \ |
Patrick Venture | 90f9bb5 | 2019-03-06 09:39:11 -0800 | [diff] [blame] | 16 | -lgmock_main \ |
Patrick Venture | 7a841b6 | 2018-06-13 09:39:46 -0700 | [diff] [blame] | 17 | $(OESDK_TESTCASE_FLAGS) \ |
| 18 | $(SDBUSPLUS_LIBS) \ |
Patrick Venture | 4cf3986 | 2018-12-06 10:24:44 -0800 | [diff] [blame] | 19 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Patrick Venture | 94feffa | 2019-03-06 09:54:49 -0800 | [diff] [blame] | 20 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 21 | $(CODE_COVERAGE_LIBS) |
Patrick Venture | 7a841b6 | 2018-06-13 09:39:46 -0700 | [diff] [blame] | 22 | |
| 23 | # Run all 'check' test programs |
Patrick Venture | 1fa9aab | 2018-06-11 10:46:49 -0700 | [diff] [blame] | 24 | check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \ |
Patrick Venture | 3349ef2 | 2018-06-12 14:09:29 -0700 | [diff] [blame] | 25 | sensor_host_unittest util_unittest pid_zone_unittest \ |
Patrick Venture | 0ef1faf | 2018-06-13 12:50:53 -0700 | [diff] [blame] | 26 | pid_thermalcontroller_unittest pid_fancontroller_unittest \ |
James Feist | 3dfaafd | 2018-09-20 15:46:58 -0700 | [diff] [blame] | 27 | pid_stepwisecontroller_unittest \ |
Patrick Venture | eeeb867 | 2019-02-08 11:47:42 -0800 | [diff] [blame] | 28 | dbus_passive_unittest dbus_active_unittest \ |
Patrick Venture | 5426c34 | 2019-02-11 12:03:30 -0800 | [diff] [blame] | 29 | sensors_json_unittest pid_json_unittest json_parse_unittest |
Patrick Venture | 7a841b6 | 2018-06-13 09:39:46 -0700 | [diff] [blame] | 30 | TESTS = $(check_PROGRAMS) |
Patrick Venture | fe75b19 | 2018-06-08 11:19:43 -0700 | [diff] [blame] | 31 | |
| 32 | # Until libconfig is mocked out or replaced, include it. |
| 33 | sensor_manager_unittest_SOURCES = sensor_manager_unittest.cpp |
| 34 | sensor_manager_unittest_LDADD = $(top_builddir)/sensors/manager.o |
Patrick Venture | e31ee6d | 2018-06-08 18:49:27 -0700 | [diff] [blame] | 35 | |
| 36 | sensor_pluggable_unittest_SOURCES = sensor_pluggable_unittest.cpp |
| 37 | sensor_pluggable_unittest_LDADD = $(top_builddir)/sensors/pluggable.o |
Patrick Venture | 1fa9aab | 2018-06-11 10:46:49 -0700 | [diff] [blame] | 38 | |
| 39 | sensor_host_unittest_SOURCES = sensor_host_unittest.cpp |
| 40 | sensor_host_unittest_LDADD = $(top_builddir)/sensors/host.o |
Patrick Venture | da06428 | 2018-06-12 19:33:47 -0700 | [diff] [blame] | 41 | |
| 42 | util_unittest_SOURCES = util_unittest.cpp |
Patrick Venture | cdd6134 | 2020-08-07 15:49:56 -0700 | [diff] [blame^] | 43 | util_unittest_LDADD = $(top_builddir)/sensors/build_utils.o |
Patrick Venture | a58197c | 2018-06-11 15:29:45 -0700 | [diff] [blame] | 44 | |
| 45 | pid_zone_unittest_SOURCES = pid_zone_unittest.cpp |
| 46 | pid_zone_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \ |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 47 | $(top_builddir)/sensors/manager.o $(top_builddir)/pid/pidcontroller.o \ |
Patrick Venture | c32e3fc | 2019-02-28 10:01:11 -0800 | [diff] [blame] | 48 | $(top_builddir)/pid/zone.o $(top_builddir)/pid/tuning.o |
Patrick Venture | 3349ef2 | 2018-06-12 14:09:29 -0700 | [diff] [blame] | 49 | |
| 50 | pid_thermalcontroller_unittest_SOURCES = pid_thermalcontroller_unittest.cpp |
| 51 | pid_thermalcontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \ |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 52 | $(top_builddir)/pid/util.o $(top_builddir)/pid/pidcontroller.o \ |
Patrick Venture | 3349ef2 | 2018-06-12 14:09:29 -0700 | [diff] [blame] | 53 | $(top_builddir)/pid/thermalcontroller.o |
Patrick Venture | 566a151 | 2018-06-12 14:51:07 -0700 | [diff] [blame] | 54 | |
James Feist | 3dfaafd | 2018-09-20 15:46:58 -0700 | [diff] [blame] | 55 | pid_stepwisecontroller_unittest_SOURCES = pid_stepwisecontroller_unittest.cpp |
| 56 | pid_stepwisecontroller_unittest_LDADD = $(top_builddir)/pid/ec/stepwise.o \ |
| 57 | $(top_builddir)/pid/util.o $(top_builddir)/pid/stepwisecontroller.o |
| 58 | |
Patrick Venture | 566a151 | 2018-06-12 14:51:07 -0700 | [diff] [blame] | 59 | pid_fancontroller_unittest_SOURCES = pid_fancontroller_unittest.cpp |
| 60 | pid_fancontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \ |
James Feist | 22c257a | 2018-08-31 14:07:12 -0700 | [diff] [blame] | 61 | $(top_builddir)/pid/util.o $(top_builddir)/pid/pidcontroller.o \ |
Patrick Venture | c32e3fc | 2019-02-28 10:01:11 -0800 | [diff] [blame] | 62 | $(top_builddir)/pid/fancontroller.o $(top_builddir)/pid/tuning.o |
Patrick Venture | 0ef1faf | 2018-06-13 12:50:53 -0700 | [diff] [blame] | 63 | |
| 64 | dbus_passive_unittest_SOURCES = dbus_passive_unittest.cpp |
| 65 | dbus_passive_unittest_LDADD = $(top_builddir)/dbus/util.o \ |
James Feist | 98b704e | 2019-06-03 16:24:53 -0700 | [diff] [blame] | 66 | $(top_builddir)/dbus/dbuspassive.o $(top_builddir)/dbus/dbuspassiveredundancy.o |
Patrick Venture | 2524323 | 2018-06-14 10:34:34 -0700 | [diff] [blame] | 67 | |
| 68 | dbus_active_unittest_SOURCES = dbus_active_unittest.cpp |
| 69 | dbus_active_unittest_LDADD = $(top_builddir)/dbus/dbusactiveread.o |
Patrick Venture | eeeb867 | 2019-02-08 11:47:42 -0800 | [diff] [blame] | 70 | |
| 71 | sensors_json_unittest_SOURCES = sensors_json_unittest.cpp |
| 72 | sensors_json_unittest_LDADD = $(top_builddir)/sensors/buildjson.o |
Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 73 | |
| 74 | pid_json_unittest_SOURCES = pid_json_unittest.cpp |
| 75 | pid_json_unittest_LDADD = $(top_builddir)/pid/buildjson.o |
Patrick Venture | 5426c34 | 2019-02-11 12:03:30 -0800 | [diff] [blame] | 76 | |
| 77 | json_parse_unittest_SOURCES = json_parse_unittest.cpp |
| 78 | json_parse_unittest_LDADD = $(top_builddir)/build/buildjson.o |