1# Build the unit tests. 2LOCAL_PATH := $(call my-dir) 3 4perfprofd_test_cppflags := -Wall -Wno-sign-compare -Wno-unused-parameter -Werror -std=gnu++11 5 6# 7# Static library with mockup utilities layer (called by unit test). 8# 9include $(CLEAR_VARS) 10LOCAL_CLANG := true 11LOCAL_CPP_EXTENSION := cc 12LOCAL_CXX_STL := libc++ 13LOCAL_C_INCLUDES += system/extras/perfprofd 14LOCAL_MODULE := libperfprofdmockutils 15LOCAL_CPPFLAGS += $(perfprofd_test_cppflags) 16LOCAL_SRC_FILES := perfprofdmockutils.cc 17include $(BUILD_STATIC_LIBRARY) 18 19# 20# Canned perf.data files needed by unit test. 21# 22include $(CLEAR_VARS) 23LOCAL_MODULE := canned.perf.data 24LOCAL_MODULE_TAGS := optional 25LOCAL_MODULE_CLASS := DATA 26LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest/perfprofd_test 27LOCAL_SRC_FILES := canned.perf.data 28include $(BUILD_PREBUILT) 29 30# 31# Unit test for perfprofd 32# 33include $(CLEAR_VARS) 34LOCAL_CLANG := true 35LOCAL_CPP_EXTENSION := cc 36LOCAL_CXX_STL := libc++ 37LOCAL_STATIC_LIBRARIES := libperfprofdcore libperfprofdmockutils libgtest libbase 38LOCAL_SHARED_LIBRARIES := libprotobuf-cpp-lite 39LOCAL_C_INCLUDES += system/extras/perfprofd external/protobuf/src 40LOCAL_SRC_FILES := perfprofd_test.cc 41LOCAL_CPPFLAGS += $(perfprofd_test_cppflags) 42LOCAL_SHARED_LIBRARIES += libcutils 43LOCAL_MODULE := perfprofd_test 44include $(BUILD_NATIVE_TEST) 45 46# Clean temp vars 47perfprofd_test_cppflags := 48