1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# see how_to_run.txt for instructions on running these tests 16 17LOCAL_PATH := $(call my-dir) 18 19include $(CLEAR_VARS) 20 21data_root_for_test_zip := $(TARGET_OUT_DATA)/DATA/ 22minikin_tests_subpath_from_data := nativetest/minikin_tests 23minikin_tests_root_in_device := /data/$(minikin_tests_subpath_from_data) 24minikin_tests_root_for_test_zip := $(data_root_for_test_zip)/$(minikin_tests_subpath_from_data) 25 26font_src_files := \ 27 data/BoldItalic.ttf \ 28 data/Bold.ttf \ 29 data/ColorEmojiFont.ttf \ 30 data/ColorTextMixedEmojiFont.ttf \ 31 data/Emoji.ttf \ 32 data/Italic.ttf \ 33 data/Ja.ttf \ 34 data/Ko.ttf \ 35 data/NoGlyphFont.ttf \ 36 data/Regular.ttf \ 37 data/TextEmojiFont.ttf \ 38 data/VarioationSelectorTest-Regular.ttf \ 39 data/ZhHans.ttf \ 40 data/ZhHant.ttf \ 41 data/itemize.xml \ 42 data/emoji.xml 43 44LOCAL_MODULE := minikin_tests 45LOCAL_MODULE_TAGS := tests 46 47GEN := $(addprefix $(minikin_tests_root_for_test_zip)/, $(font_src_files)) 48$(GEN): PRIVATE_PATH := $(LOCAL_PATH) 49$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ 50$(GEN): $(minikin_tests_root_for_test_zip)/data/% : $(LOCAL_PATH)/data/% 51 $(transform-generated-source) 52LOCAL_GENERATED_SOURCES += $(GEN) 53 54LOCAL_STATIC_LIBRARIES := libminikin 55LOCAL_PICKUP_FILES := $(data_root_for_test_zip) 56 57# Shared libraries which are dependencies of minikin; these are not automatically 58# pulled in by the build system (and thus sadly must be repeated). 59 60LOCAL_SHARED_LIBRARIES := \ 61 libskia \ 62 libft2 \ 63 libharfbuzz_ng \ 64 libicuuc \ 65 liblog \ 66 libutils \ 67 libz 68 69LOCAL_STATIC_LIBRARIES += \ 70 libxml2 71 72LOCAL_SRC_FILES += \ 73 FontCollectionTest.cpp \ 74 FontCollectionItemizeTest.cpp \ 75 FontFamilyTest.cpp \ 76 FontLanguageListCacheTest.cpp \ 77 FontTestUtils.cpp \ 78 HbFontCacheTest.cpp \ 79 MinikinFontForTest.cpp \ 80 MinikinInternalTest.cpp \ 81 GraphemeBreakTests.cpp \ 82 LayoutUtilsTest.cpp \ 83 UnicodeUtils.cpp \ 84 WordBreakerTests.cpp 85 86LOCAL_C_INCLUDES := \ 87 $(LOCAL_PATH)/../libs/minikin/ \ 88 external/harfbuzz_ng/src \ 89 external/libxml2/include \ 90 external/skia/src/core 91 92LOCAL_CPPFLAGS += -Werror -Wall -Wextra \ 93 -DkTestFontDir="\"$(minikin_tests_root_in_device)/data/\"" 94 95include $(BUILD_NATIVE_TEST) 96