blob: 3674dcadd7481d0220b4f6164e9a2235554920b3 [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) \
Carol Wang9bbe6022019-08-01 17:31:30 +08008 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
Patrick Venture69a68ed2019-03-06 10:37:30 -08009AM_CFLAGS = \
10 $(CODE_COVERAGE_CFLAGS)
11AM_CXXFLAGS = \
12 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venture9f514812018-06-27 10:19:32 -070013AM_LDFLAGS = \
Patrick Venture5d8f5702019-03-06 10:24:04 -080014 $(GTEST_LIBS) \
Patrick Venture609fe982018-04-17 17:51:56 -070015 $(GMOCK_LIBS) \
Patrick Venture5d8f5702019-03-06 10:24:04 -080016 -lgmock_main \
Patrick Venture609fe982018-04-17 17:51:56 -070017 $(OESDK_TESTCASE_FLAGS) \
18 $(SDBUSPLUS_LIBS) \
Patrick Venture69a68ed2019-03-06 10:37:30 -080019 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
Matt Spinler5e034af2020-06-24 15:21:53 -050020 $(CODE_COVERAGE_LIBS) \
21 $(FMT_LIBS)
Patrick Venture609fe982018-04-17 17:51:56 -070022
23# Run all 'check' test programs
Carol Wang9bbe6022019-08-01 17:31:30 +080024check_PROGRAMS = hwmon_unittest fanpwm_unittest sensor_unittest hwmonio_default_unittest env_unittest average_unittest
Patrick Venture609fe982018-04-17 17:51:56 -070025TESTS = $(check_PROGRAMS)
26
Carol Wang9bbe6022019-08-01 17:31:30 +080027env_unittest_SOURCES = env_unittest.cpp
Carol Wang9bbe6022019-08-01 17:31:30 +080028
29average_unittest_SOURCES = average_unittest.cpp
30average_unittest_LDADD = $(top_builddir)/average.o
31
Patrick Venture609fe982018-04-17 17:51:56 -070032hwmon_unittest_SOURCES = hwmon_unittest.cpp
33hwmon_unittest_LDADD = $(top_builddir)/hwmon.o
34
Patrick Venture50552372018-06-07 10:53:56 -070035fanpwm_unittest_SOURCES = fanpwm_unittest.cpp
36fanpwm_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) $(top_builddir)/fan_pwm.o
Patrick Venture0e2d68d2018-12-19 07:53:45 -080037
38sensor_unittest_SOURCES = sensor_unittest.cpp
39sensor_unittest_CXXFLAGS = \
40 $(PHOSPHOR_LOGGING_CFLAGS) \
41 $(GPIOPLUS_CFLAGS)
William A. Kennington III2227bd52019-06-19 11:32:22 -070042 $(STDPLUS_CFLAGS)
Patrick Venture0e2d68d2018-12-19 07:53:45 -080043sensor_unittest_LDADD = \
44 -lstdc++fs \
45 $(PHOSPHOR_LOGGING_LIBS) \
46 $(GPIOPLUS_LIBS) \
William A. Kennington III2227bd52019-06-19 11:32:22 -070047 $(STDPLUS_LIBS) \
Patrick Venture0e2d68d2018-12-19 07:53:45 -080048 $(top_builddir)/sensor.o \
49 $(top_builddir)/hwmon.o \
Patrick Venture99b95812018-12-19 08:59:15 -080050 gpio.o
Patrick Venturecaaebd12019-06-21 14:56:07 -070051
52hwmonio_default_unittest_SOURCES = hwmonio_default_unittest.cpp
53hwmonio_default_unittest_LDADD = $(top_builddir)/hwmonio.o