diff options
author | Vatsal Bucha <vbucha@codeaurora.org> | 2018-11-14 13:25:08 +0530 |
---|---|---|
committer | Vatsal Bucha <vbucha@codeaurora.org> | 2018-11-14 13:25:50 +0530 |
commit | c09ae066d5ddae12477824b9a6442b7a3640a8f6 (patch) | |
tree | 971f9b5f31f5aeae711a48fff502e44304f05efc /qahw_api | |
parent | 298dfd8615d63357008bc5ba3654f26eada662a6 (diff) | |
download | android_hardware_qcom_audio-c09ae066d5ddae12477824b9a6442b7a3640a8f6.tar.gz android_hardware_qcom_audio-c09ae066d5ddae12477824b9a6442b7a3640a8f6.tar.bz2 android_hardware_qcom_audio-c09ae066d5ddae12477824b9a6442b7a3640a8f6.zip |
audio: Add flags to makefiles
Enable GCOV if config is set to true. Also
add gcov_flush in source files to get enhanced
code coverage.
Change-Id: I39776cc6d6f16cd23da05b66669eea22fc4cba81
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Diffstat (limited to 'qahw_api')
-rw-r--r-- | qahw_api/Android.mk | 6 | ||||
-rw-r--r-- | qahw_api/test/Android.mk | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/qahw_api/Android.mk b/qahw_api/Android.mk index fa4e6cb5..1cad75d5 100644 --- a/qahw_api/Android.mk +++ b/qahw_api/Android.mk @@ -14,6 +14,12 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/qahw/inc LOCAL_SRC_FILES := \ src/qahw_api.cpp +ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true) +LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage +LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage +LOCAL_STATIC_LIBRARIES += libprofile_rt +endif + LOCAL_SHARED_LIBRARIES := \ liblog \ libcutils \ diff --git a/qahw_api/test/Android.mk b/qahw_api/test/Android.mk index 06e8a5a2..cca72f85 100644 --- a/qahw_api/test/Android.mk +++ b/qahw_api/test/Android.mk @@ -20,6 +20,12 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libcutils +ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GCOV)),true) +LOCAL_CFLAGS += --coverage -fprofile-arcs -ftest-coverage +LOCAL_CPPFLAGS += --coverage -fprofile-arcs -ftest-coverage +LOCAL_STATIC_LIBRARIES += libprofile_rt +endif + LOCAL_32_BIT_ONLY := true LOCAL_C_INCLUDES += $(hal-play-inc) |