test: pid: fancontroller
Adds unit-tests for the fancontroller.
Bugfix: set point not initialized to 0, although bug has no impact.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: I516833d8c9ed806b765ff9333801f3d57932a17b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 6bd5138..4d78bc6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -13,7 +13,7 @@
# Run all 'check' test programs
check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \
sensor_host_unittest util_unittest pid_zone_unittest \
- pid_thermalcontroller_unittest
+ pid_thermalcontroller_unittest pid_fancontroller_unittest
TESTS = $(check_PROGRAMS)
# Until libconfig is mocked out or replaced, include it.
@@ -38,3 +38,8 @@
pid_thermalcontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
$(top_builddir)/pid/util.o $(top_builddir)/pid/controller.o \
$(top_builddir)/pid/thermalcontroller.o
+
+pid_fancontroller_unittest_SOURCES = pid_fancontroller_unittest.cpp
+pid_fancontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
+ $(top_builddir)/pid/util.o $(top_builddir)/pid/controller.o \
+ $(top_builddir)/pid/fancontroller.o