charger: add charger_test
Test: charger_test
Bug: 63702641
Change-Id: Id50d024c015916cb8007742e3c17eaf1161b909f
diff --git a/healthd/Android.mk b/healthd/Android.mk
index d725f73..5f10f1e 100644
--- a/healthd/Android.mk
+++ b/healthd/Android.mk
@@ -96,7 +96,7 @@
LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_SLOW=$(BOARD_PERIODIC_CHORES_INTERVAL_SLOW)
endif
-LOCAL_STATIC_LIBRARIES := \
+CHARGER_STATIC_LIBRARIES := \
android.hardware.health@2.0-impl \
android.hardware.health@2.0 \
android.hardware.health@1.0 \
@@ -114,6 +114,8 @@
libm \
libc \
+LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES)
+
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
LOCAL_STATIC_LIBRARIES += \
libminui \
@@ -134,6 +136,21 @@
include $(BUILD_EXECUTABLE)
+include $(CLEAR_VARS)
+LOCAL_MODULE := charger_test
+LOCAL_MODULE_TAGS := optional
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
+LOCAL_CFLAGS := -Wall -Werror -DCHARGER_TEST -DCHARGER_NO_UI
+LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES)
+LOCAL_SRC_FILES := \
+ charger.cpp \
+ charger_test.cpp \
+
+include $(BUILD_EXECUTABLE)
+
+CHARGER_STATIC_LIBRARIES :=
+
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
define _add-charger-image
include $$(CLEAR_VARS)