Patrick Venture | 7e27665 | 2019-03-13 08:17:03 -0700 | [diff] [blame] | 1 | @VALGRIND_CHECK_RULES@ |
| 2 | |
Patrick Venture | 5d8f570 | 2019-03-06 10:24:04 -0800 | [diff] [blame] | 3 | AM_CPPFLAGS = \ |
| 4 | -I$(top_srcdir)/ \ |
| 5 | $(GTEST_CFLAGS) \ |
| 6 | $(GMOCK_CFLAGS) \ |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 7 | $(SDBUSPLUS_CFLAGS) \ |
Carol Wang | 9bbe602 | 2019-08-01 17:31:30 +0800 | [diff] [blame] | 8 | $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) |
Patrick Venture | 69a68ed | 2019-03-06 10:37:30 -0800 | [diff] [blame] | 9 | AM_CFLAGS = \ |
| 10 | $(CODE_COVERAGE_CFLAGS) |
| 11 | AM_CXXFLAGS = \ |
| 12 | $(CODE_COVERAGE_CXXFLAGS) |
Patrick Venture | 9f51481 | 2018-06-27 10:19:32 -0700 | [diff] [blame] | 13 | AM_LDFLAGS = \ |
Patrick Venture | 5d8f570 | 2019-03-06 10:24:04 -0800 | [diff] [blame] | 14 | $(GTEST_LIBS) \ |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 15 | $(GMOCK_LIBS) \ |
Patrick Venture | 5d8f570 | 2019-03-06 10:24:04 -0800 | [diff] [blame] | 16 | -lgmock_main \ |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 17 | $(OESDK_TESTCASE_FLAGS) \ |
| 18 | $(SDBUSPLUS_LIBS) \ |
Patrick Venture | 69a68ed | 2019-03-06 10:37:30 -0800 | [diff] [blame] | 19 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ |
Matt Spinler | 5e034af | 2020-06-24 15:21:53 -0500 | [diff] [blame] | 20 | $(CODE_COVERAGE_LIBS) \ |
| 21 | $(FMT_LIBS) |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 22 | |
| 23 | # Run all 'check' test programs |
Carol Wang | 9bbe602 | 2019-08-01 17:31:30 +0800 | [diff] [blame] | 24 | check_PROGRAMS = hwmon_unittest fanpwm_unittest sensor_unittest hwmonio_default_unittest env_unittest average_unittest |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 25 | TESTS = $(check_PROGRAMS) |
| 26 | |
Carol Wang | 9bbe602 | 2019-08-01 17:31:30 +0800 | [diff] [blame] | 27 | env_unittest_SOURCES = env_unittest.cpp |
Carol Wang | 9bbe602 | 2019-08-01 17:31:30 +0800 | [diff] [blame] | 28 | |
| 29 | average_unittest_SOURCES = average_unittest.cpp |
| 30 | average_unittest_LDADD = $(top_builddir)/average.o |
| 31 | |
Patrick Venture | 609fe98 | 2018-04-17 17:51:56 -0700 | [diff] [blame] | 32 | hwmon_unittest_SOURCES = hwmon_unittest.cpp |
| 33 | hwmon_unittest_LDADD = $(top_builddir)/hwmon.o |
| 34 | |
Patrick Venture | 5055237 | 2018-06-07 10:53:56 -0700 | [diff] [blame] | 35 | fanpwm_unittest_SOURCES = fanpwm_unittest.cpp |
| 36 | fanpwm_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) $(top_builddir)/fan_pwm.o |
Patrick Venture | 0e2d68d | 2018-12-19 07:53:45 -0800 | [diff] [blame] | 37 | |
| 38 | sensor_unittest_SOURCES = sensor_unittest.cpp |
| 39 | sensor_unittest_CXXFLAGS = \ |
| 40 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 41 | $(GPIOPLUS_CFLAGS) |
William A. Kennington III | 2227bd5 | 2019-06-19 11:32:22 -0700 | [diff] [blame] | 42 | $(STDPLUS_CFLAGS) |
Patrick Venture | 0e2d68d | 2018-12-19 07:53:45 -0800 | [diff] [blame] | 43 | sensor_unittest_LDADD = \ |
| 44 | -lstdc++fs \ |
| 45 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 46 | $(GPIOPLUS_LIBS) \ |
William A. Kennington III | 2227bd5 | 2019-06-19 11:32:22 -0700 | [diff] [blame] | 47 | $(STDPLUS_LIBS) \ |
Patrick Venture | 0e2d68d | 2018-12-19 07:53:45 -0800 | [diff] [blame] | 48 | $(top_builddir)/sensor.o \ |
| 49 | $(top_builddir)/hwmon.o \ |
Patrick Venture | 99b9581 | 2018-12-19 08:59:15 -0800 | [diff] [blame] | 50 | gpio.o |
Patrick Venture | caaebd1 | 2019-06-21 14:56:07 -0700 | [diff] [blame] | 51 | |
| 52 | hwmonio_default_unittest_SOURCES = hwmonio_default_unittest.cpp |
| 53 | hwmonio_default_unittest_LDADD = $(top_builddir)/hwmonio.o |