blob: 37aa977418f9cf6195c90e64a72339a694abba6c [file] [log] [blame]
Patrick Venture7e276652019-03-13 08:17:03 -07001@VALGRIND_CHECK_RULES@
2
Patrick Venture5d8f5702019-03-06 10:24:04 -08003AM_CPPFLAGS = \
4 -I$(top_srcdir)/ \
5 $(GTEST_CFLAGS) \
6 $(GMOCK_CFLAGS) \
Patrick Venture609fe982018-04-17 17:51:56 -07007 $(SDBUSPLUS_CFLAGS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -08008 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
9 $(CODE_COVERAGE_CPPFLAGS)
10AM_CFLAGS = \
11 $(CODE_COVERAGE_CFLAGS)
12AM_CXXFLAGS = \
13 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venture9f514812018-06-27 10:19:32 -070014AM_LDFLAGS = \
Patrick Venture5d8f5702019-03-06 10:24:04 -080015 $(GTEST_LIBS) \
Patrick Venture609fe982018-04-17 17:51:56 -070016 $(GMOCK_LIBS) \
Patrick Venture5d8f5702019-03-06 10:24:04 -080017 -lgmock_main \
Patrick Venture609fe982018-04-17 17:51:56 -070018 $(OESDK_TESTCASE_FLAGS) \
19 $(SDBUSPLUS_LIBS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -080020 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
21 $(CODE_COVERAGE_LIBS)
Patrick Venture609fe982018-04-17 17:51:56 -070022
23# Run all 'check' test programs
Patrick Venture0e2d68d2018-12-19 07:53:45 -080024check_PROGRAMS = hwmon_unittest fanpwm_unittest sensor_unittest
Patrick Venture609fe982018-04-17 17:51:56 -070025TESTS = $(check_PROGRAMS)
26
27hwmon_unittest_SOURCES = hwmon_unittest.cpp
28hwmon_unittest_LDADD = $(top_builddir)/hwmon.o
29
Patrick Venture50552372018-06-07 10:53:56 -070030fanpwm_unittest_SOURCES = fanpwm_unittest.cpp
31fanpwm_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) $(top_builddir)/fan_pwm.o
Patrick Venture0e2d68d2018-12-19 07:53:45 -080032
33sensor_unittest_SOURCES = sensor_unittest.cpp
34sensor_unittest_CXXFLAGS = \
35 $(PHOSPHOR_LOGGING_CFLAGS) \
36 $(GPIOPLUS_CFLAGS)
37sensor_unittest_LDADD = \
38 -lstdc++fs \
39 $(PHOSPHOR_LOGGING_LIBS) \
40 $(GPIOPLUS_LIBS) \
41 $(top_builddir)/sensor.o \
42 $(top_builddir)/hwmon.o \
Patrick Venture99b95812018-12-19 08:59:15 -080043 env.o \
44 gpio.o