diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-03-22 08:46:55 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2017-04-25 15:08:56 -0700 |
commit | 5649b31a177f98e0f6601ec03c0e0b4fc0ae07e0 (patch) | |
tree | 5986f73ac3ac4d50b4129efc7fcd6f8e66dca4f6 /tools/fs_config/Android.mk | |
parent | 5aada52ffbf2924e6117f87efddddce340cc1af8 (diff) | |
download | platform_build-5649b31a177f98e0f6601ec03c0e0b4fc0ae07e0.tar.gz platform_build-5649b31a177f98e0f6601ec03c0e0b4fc0ae07e0.tar.bz2 platform_build-5649b31a177f98e0f6601ec03c0e0b4fc0ae07e0.zip |
fs_config_generate: unit test
Test -D and -F flag of fs_config_generate
Test: gTest host fs_config-unit-tests
Bug: 36071012
Change-Id: I23a655b17b7c55817f2aacc760700ff1b0728db3
Diffstat (limited to 'tools/fs_config/Android.mk')
-rw-r--r-- | tools/fs_config/Android.mk | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk index 65f8a081a2..4a2b566e45 100644 --- a/tools/fs_config/Android.mk +++ b/tools/fs_config/Android.mk @@ -195,3 +195,36 @@ ANDROID_FS_CONFIG_H := my_fs_config_h := fs_config_generate_bin := my_gen_oem_aid := + +# ----------------------------------------------------------------------------- +# Unit tests. +# ----------------------------------------------------------------------------- + +test_c_flags := \ + -fstack-protector-all \ + -g \ + -Wall \ + -Wextra \ + -Werror \ + -fno-builtin \ + -DANDROID_FILESYSTEM_CONFIG='"android_filesystem_config_test_data.h"' + +################################## +# test executable +include $(CLEAR_VARS) +LOCAL_MODULE := fs_config_generate_test +LOCAL_SRC_FILES := fs_config_generate.c +LOCAL_SHARED_LIBRARIES := libcutils +LOCAL_CFLAGS := $(test_c_flags) +LOCAL_MODULE_RELATIVE_PATH := fs_config-unit-tests +LOCAL_GTEST := false +include $(BUILD_HOST_NATIVE_TEST) + +################################## +# gTest tool +include $(CLEAR_VARS) +LOCAL_MODULE := fs_config-unit-tests +LOCAL_CFLAGS += $(test_c_flags) -DHOST +LOCAL_SHARED_LIBRARIES := liblog libcutils libbase +LOCAL_SRC_FILES := fs_config_test.cpp +include $(BUILD_HOST_NATIVE_TEST) |