Android.mk revision d178c83d45ef5ff5caa6f8e92d461ada72c37bd2
1cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 2cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Copyright (C) 2012 The Android Open Source Project 3cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 4cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Licensed under the Apache License, Version 2.0 (the "License"); 5cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# you may not use this file except in compliance with the License. 6cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# You may obtain a copy of the License at 7cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 8cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# http://www.apache.org/licenses/LICENSE-2.0 9cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# 10cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# Unless required by applicable law or agreed to in writing, software 11cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# distributed under the License is distributed on an "AS IS" BASIS, 12cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# See the License for the specific language governing permissions and 14cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes# limitations under the License. 155ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby# 165ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby 17e7c59f9e2041812c597ff1c8689d47d1bfd32883Elliott Hughesifneq ($(BUILD_TINY_ANDROID),true) 18cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 19cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott HughesLOCAL_PATH := $(call my-dir) 20cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 217be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 227be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# Unit tests. 237be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 247be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes 25f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64)) 26f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_host := true 27f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferriselse 28f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_host := false 29f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisendif 30f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 31f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 32f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# All standard tests. 33f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 34f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferristest_cflags = \ 35dcab1b2c76a498c56bc00024613386de8b4b2aaeNick Kralevich -fstack-protector-all \ 36ad88a0863110798cef5169dcf917e18b967a7cf6Elliott Hughes -g \ 37ad88a0863110798cef5169dcf917e18b967a7cf6Elliott Hughes -Wall -Wextra \ 38ad88a0863110798cef5169dcf917e18b967a7cf6Elliott Hughes -Werror \ 39a0ee07829a9ba7e99ef68e8c12551301cc797f0fElliott Hughes -fno-builtin \ 40ad88a0863110798cef5169dcf917e18b967a7cf6Elliott Hughes 413d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughestest_cflags += -D__STDC_LIMIT_MACROS # For glibc. 423d7a0d9b08ecab054b2dff8332507644de3690b0Elliott Hughes 4372bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferrisifeq ($(MALLOC_IMPL),jemalloc) 4472bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferristest_cflags += -DUSE_JEMALLOC 4572bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferrisendif 4672bbd423579bb971dc06cdd3c06201faf3fe95e6Christopher Ferris 47b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Alberttest_cppflags = \ 48b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert -std=gnu++11 \ 49b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert 50f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher FerrislibBionicStandardTests_src_files := \ 516a41b0fb0e589c4afc4ecbcf7c425f0aa40eaea4Elliott Hughes arpa_inet_test.cpp \ 52b687ad3c3491fffe22507cafc9347e10cbf6bd31Christopher Ferris buffer_tests.cpp \ 53f3c73901cb5ca4de2651151cf2c65b31a729466eElliott Hughes ctype_test.cpp \ 54063cfb2084ea4b12d3c85b2d2c44e888f0857eb4Elliott Hughes dirent_test.cpp \ 558baa929d5d3bcf63381cf78ba76168c80c303f5eKito Cheng eventfd_test.cpp \ 56062092543fdbd6fa2676e4f5b37a15f7bba94332Elliott Hughes fcntl_test.cpp \ 5790e10d41c4271a5d517f60f4ff1d2891b8ccc034Elliott Hughes fenv_test.cpp \ 58d4934a70e69365c97b1378820152e134a0089b5eCalin Juravle ftw_test.cpp \ 592c5153b043b44e9935a334ae9b2d5a4bc5258b40Nick Kralevich getauxval_test.cpp \ 6004a83a48ed89f433c78e31106ed50059764797a0Elliott Hughes getcwd_test.cpp \ 6174f0833df6d04d51eb4e554845862ed7279f78b0Elliott Hughes inttypes_test.cpp \ 628f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes libc_logging_test.cpp \ 6358b575485c446f9d76ee00f67516ed42cf017769Elliott Hughes libgen_test.cpp \ 6450282f72bb9be6b49212a3978faec70786e9f97fPavel Chupin locale_test.cpp \ 65885f3b9cad01b8158aadc55c159c17dbf34f622cChristopher Ferris malloc_test.cpp \ 66568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_cos_test.cpp \ 67568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_cosf_test.cpp \ 68568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_exp_test.cpp \ 69568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_expf_test.cpp \ 70568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_log_test.cpp \ 71568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_logf_test.cpp \ 72568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_pow_test.cpp \ 73568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_powf_test.cpp \ 74568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_sin_test.cpp \ 75568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_sinf_test.cpp \ 76568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_sincos_test.cpp \ 77568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_sincosf_test.cpp \ 78568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_tan_test.cpp \ 79568d64dc6213b137e43d65e007cc2c60adc16071Jingwei Zhang math_tanf_test.cpp \ 80a0ee07829a9ba7e99ef68e8c12551301cc797f0fElliott Hughes math_test.cpp \ 81eb664e24c074b88539b743668109d8b4eaa925bdElliott Hughes mntent_test.cpp \ 82d3b9d11369ee15dc0ce512014284c3c5432f2813Elliott Hughes netdb_test.cpp \ 83bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes pthread_test.cpp \ 84cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes regex_test.cpp \ 8553bfdae4ffdbd43d0c019d1a35af1f8477a272c9Elliott Hughes sched_test.cpp \ 86da73f655fcbac6e1a8bfd35303cef6f41187d12bElliott Hughes signal_test.cpp \ 87ad88a0863110798cef5169dcf917e18b967a7cf6Elliott Hughes stack_protector_test.cpp \ 88c45087bffa528c0809f0df2e0a3708eba7018b33Sergey Melnikov stack_unwinding_test.cpp \ 89e6c57fcb05b0dcbfa8129bb6f7d99093f4819370Elliott Hughes stdatomic_test.cpp \ 90da030de702b756077fec536ed139e7ea38b51022Calin Juravle stdint_test.cpp \ 9191875dcd6e17b7f3b251efe9b236b905ef414ddeElliott Hughes stdio_test.cpp \ 92774c7f54ff375d71106283d42779b0cc5f238f87Elliott Hughes stdlib_test.cpp \ 93b5f053b5a7deb084e7a052d527e0aa41339ae05cIrina Tirdea string_test.cpp \ 9473964c592c8d23901e9479893dfbd3d0f25bab04Elliott Hughes strings_test.cpp \ 952a54e5ecd0a96398e8d7d9b1629ecf8fb1633a2bKenny Root stubs_test.cpp \ 968c42606ae10b59318c9a4ea83854049bab5b9328Elliott Hughes sstream_test.cpp \ 9711952073af22568bba0b661f7a9d4402c443a888Elliott Hughes sys_epoll_test.cpp \ 98431166d99519f6794f10c48694913d2fe864b841Elliott Hughes sys_mman_test.cpp \ 990f461e35f63200641fc53bba222845a84589c024Elliott Hughes sys_resource_test.cpp \ 1005b9310e502003e584bcb3a028ca3db7aa4d3f01bElliott Hughes sys_select_test.cpp \ 101b4f7616fd618875768b8fffc122b58bdb84a9969Elliott Hughes sys_sendfile_test.cpp \ 1026ff0c75c838e73d2aeccc0102ab58a7b865172caGuillaume Ranquet sys_socket_test.cpp \ 103d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1Elliott Hughes sys_stat_test.cpp \ 104db1ea3474899ebbd783aba872d3005f95a816d0fElliott Hughes sys_statvfs_test.cpp \ 105e61dc71efca544f4066a93706b639a29b3600229Elliott Hughes sys_syscall_test.cpp \ 106f8fcfbc85a3ce3e195626b90736d3a484331494bElliott Hughes sys_time_test.cpp \ 107894f8cb1395d3409bb995d18abc1b3409c557d01Elliott Hughes sys_types_test.cpp \ 108db1ea3474899ebbd783aba872d3005f95a816d0fElliott Hughes sys_vfs_test.cpp \ 109b27e200ad6170ba3163f5ae6ba581bdaabb2e696Colin Cross system_properties_test.cpp \ 110e0175ca7e440a87e9d03f249fc8f210063df7908Elliott Hughes time_test.cpp \ 111a55f63083fb16b2595f517a3260083e5f8cddd02Elliott Hughes unistd_test.cpp \ 11277e944fd46728075fe632bcb5211da9daf5b7e68Elliott Hughes wchar_test.cpp \ 113cc213f871bf4c5329eb5eb7a80a0ce9d4a880af8Elliott Hughes 114f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher FerrislibBionicStandardTests_cflags := \ 115f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(test_cflags) \ 116acf5aa76a56f101607aeb8e6d1fbea24d0d4f68cjeffhao 117b8425c549a0bfe08b01b5906b95603d8523c1b16Dan AlbertlibBionicStandardTests_cppflags := \ 118b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert $(test_cppflags) \ 119b8425c549a0bfe08b01b5906b95603d8523c1b16Dan Albert 120f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher FerrislibBionicStandardTests_ldlibs_host := \ 121f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -lrt \ 1225bcf39842e8c4b02ae557a2765a84e724f762469Nick Kralevich 123d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher FerrislibBionicStandardTests_whole_static_libraries := \ 124d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris libBionicUnwindTest \ 125d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris 126f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := libBionicStandardTests 127f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 128f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 129f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 130f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 131f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 132f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 133c45087bffa528c0809f0df2e0a3708eba7018b33Sergey Melnikov 134f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 135d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris# Special stack unwinding test library compiled with special flags. 136d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris# ----------------------------------------------------------------------------- 137d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher FerrislibBionicUnwindTest_cflags := \ 138d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris $(test_cflags) \ 139d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris -fexceptions \ 140d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris -fnon-call-exceptions \ 141d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris 142d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher FerrislibBionicUnwindTest_src_files := \ 143d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris stack_unwinding_test_impl.c \ 144d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris 145d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrismodule := libBionicUnwindTest 146d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrismodule_tag := optional 147d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrisbuild_type := target 148d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrisbuild_target := STATIC_TEST_LIBRARY 149d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 150d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrisbuild_type := host 151d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 152d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris 153d178c83d45ef5ff5caa6f8e92d461ada72c37bd2Christopher Ferris# ----------------------------------------------------------------------------- 154f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Fortify tests. 155f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 156f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris$(foreach compiler,gcc clang, \ 157f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(foreach test,1 2, \ 158f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(eval fortify$(test)-tests-$(compiler)_cflags := \ 159f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(test_cflags) \ 160f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -U_FORTIFY_SOURCE \ 161f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -D_FORTIFY_SOURCE=$(test) \ 162f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -DTEST_NAME=Fortify$(test)_$(compiler)); \ 163f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(eval fortify$(test)-tests-$(compiler)_cflags_host := \ 164f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -Wno-error); \ 165f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(eval fortify$(test)-tests-$(compiler)_src_files := \ 166f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris fortify_test.cpp); \ 167f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(eval fortify_libs += fortify$(test)-tests-$(compiler)); \ 168f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris ) \ 169f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris) 170f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 171f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := fortify1-tests-gcc 172f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 173f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 174f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 175f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 176f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 177f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 178f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 179f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := fortify2-tests-gcc 180f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 181f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 182f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 183f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 184f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 185f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 186f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 187f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisfortify1-tests-clang_clang_target := true 188f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisfortify1-tests-clang_cflags_host := -D__clang__ 189f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 190f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := fortify1-tests-clang 191f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 192f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 193f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 194f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 195f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 196f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 197f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 198f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisfortify2-tests-clang_clang_target := true 199f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 200f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisfortify2-tests-clang_cflags_host := -D__clang__ 201f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 202f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := fortify2-tests-clang 203f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 204f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 205f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 206f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 207f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 208f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 209c45087bffa528c0809f0df2e0a3708eba7018b33Sergey Melnikov 210f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 211f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Library of all tests (excluding the dynamic linker tests). 212f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 213f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher FerrislibBionicTests_whole_static_libraries := \ 214f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libBionicStandardTests \ 215f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris $(fortify_libs) \ 216f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 217f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := libBionicTests 218f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 219f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 220f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := STATIC_TEST_LIBRARY 221f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 222f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 223f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 224bfeab1bbe7e8d0c08b7e3f46aedab64e3b2bf706Elliott Hughes 2257be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 226f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Library used by dlfcn tests. 227153d92765bb693541abf49a2a1d31335e2c90348Christopher Ferris# ----------------------------------------------------------------------------- 228f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64)) 229f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisno-elf-hash-table-library_src_files := \ 230f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris empty.cpp \ 231f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 232f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisno-elf-hash-table-library_ldflags := \ 233f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -Wl,--hash-style=gnu \ 234f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 235f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := no-elf-hash-table-library 236f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 237f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 238f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := SHARED_LIBRARY 239f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 240f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisendif 241153d92765bb693541abf49a2a1d31335e2c90348Christopher Ferris 242f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 24326ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)# Library used by dlext tests - with/without GNU RELRO program header 24412bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)# ----------------------------------------------------------------------------- 24512bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)libdlext_test_src_files := \ 24612bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles) dlext_test_library.cpp \ 24712bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles) 24826ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)libdlext_test_ldflags := \ 24926ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) -Wl,-z,relro \ 25026ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) 25112bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)module := libdlext_test 25212bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)module_tag := optional 25312bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)build_type := target 25412bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)build_target := SHARED_LIBRARY 25512bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)include $(LOCAL_PATH)/Android.build.mk 25612bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles) 2577db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov# ----------------------------------------------------------------------------- 2587db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov# create symlink to libdlext_test.so for symlink test 2597db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov# ----------------------------------------------------------------------------- 2607db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanovlibdlext_origin := $(LOCAL_INSTALLED_MODULE) 2617db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanovlibdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin)) 2627db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov$(libdlext_sym): $(libdlext_origin) 2637db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov @echo "Symlink: $@ -> $(notdir $<)" 2647db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov @mkdir -p $(dir $@) 2657db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov $(hide) ln -sf $(notdir $<) $@ 2667db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov 2677db180919c335287b201e859faa8ee0dbe281cdeDmitriy IvanovALL_MODULES := \ 2687db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov $(ALL_MODULES) $(libdlext_sym) 2697db180919c335287b201e859faa8ee0dbe281cdeDmitriy Ivanov 270d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanovifneq ($(TARGET_2ND_ARCH),) 271d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov# link 64 bit .so 272d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanovlibdlext_origin := $(TARGET_OUT)/lib64/libdlext_test.so 273d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanovlibdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin)) 274d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov$(libdlext_sym): $(libdlext_origin) 275d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov @echo "Symlink: $@ -> $(notdir $<)" 276d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov @mkdir -p $(dir $@) 277d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov $(hide) ln -sf $(notdir $<) $@ 278d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov 279d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy IvanovALL_MODULES := \ 280d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov $(ALL_MODULES) $(libdlext_sym) 281d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanovendif 282d59e50063ad708509f3ad83350be33f5612c4f54Dmitriy Ivanov 28326ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)libdlext_test_norelro_src_files := \ 28426ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) dlext_test_library.cpp \ 28526ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) 28626ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)libdlext_test_norelro_ldflags := \ 28726ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) -Wl,-z,norelro \ 28826ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) 28926ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)module := libdlext_test_norelro 29026ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)module_tag := optional 29126ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)build_type := target 29226ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)build_target := SHARED_LIBRARY 29326ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles)include $(LOCAL_PATH)/Android.build.mk 29426ec9679ff01fb155ae21015f31cc95bed24f670Torne (Richard Coles) 29512bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles)# ----------------------------------------------------------------------------- 296b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov# Library used by dlfcn tests 297b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov# ----------------------------------------------------------------------------- 298b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanovlibtest_simple_src_files := \ 299b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov dlopen_testlib_simple.cpp 300b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov 301b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanovmodule := libtest_simple 302b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanovbuild_type := target 303b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanovbuild_target := SHARED_LIBRARY 304b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanovinclude $(LOCAL_PATH)/Android.build.mk 305b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov 306b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov 307b648a8a57ee42533a5bf127225a252f73ca2cbbcDmitriy Ivanov# ----------------------------------------------------------------------------- 3086396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanov# Library used by atexit tests 3096b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov# ----------------------------------------------------------------------------- 3106b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov 3116b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovlibtest_atexit_src_files := \ 3126b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov atexit_testlib.cpp 3136b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov 3146b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovmodule := libtest_atexit 3156b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovbuild_type := target 3166b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovbuild_target := SHARED_LIBRARY 3176b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovinclude $(LOCAL_PATH)/Android.build.mk 3186b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov 3196b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov# ----------------------------------------------------------------------------- 320f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Tests for the device using bionic's .so. Run with: 321f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests 322f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# ----------------------------------------------------------------------------- 323f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests_whole_static_libraries := \ 324f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libBionicTests \ 325f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 326f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests_src_files := \ 3276b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov atexit_test.cpp \ 32812bbb9164578b6512b8b07a3fb093858244b7c7bTorne (Richard Coles) dlext_test.cpp \ 329f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris dlfcn_test.cpp \ 3308240bed918722944c9985bc0cca89eb44c4f6c91Christopher Ferris 3316396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanovbionic-unit-tests_cppflags := \ 3326396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanov $(test_cppflags) 3336396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanov 334f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests_ldflags := \ 335f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -Wl,--export-dynamic \ 336f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris -Wl,-u,DlSymTestFunction \ 3378240bed918722944c9985bc0cca89eb44c4f6c91Christopher Ferris 33826052616915fe2324755687c7db73d69c521b34dTorne (Richard Coles)bionic-unit-tests_c_includes := \ 33926052616915fe2324755687c7db73d69c521b34dTorne (Richard Coles) $(call include-path-for, libpagemap) \ 34026052616915fe2324755687c7db73d69c521b34dTorne (Richard Coles) 341f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests_shared_libraries_target := \ 342f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libdl \ 34326052616915fe2324755687c7db73d69c521b34dTorne (Richard Coles) libpagemap \ 3448240bed918722944c9985bc0cca89eb44c4f6c91Christopher Ferris 345f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := bionic-unit-tests 346f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 3475090964da02c956f099a49b5a3eb732c0085c58bChristopher Ferrisbionic-unit-tests_multilib := both 348f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 349f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := NATIVE_TEST 350f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 351153d92765bb693541abf49a2a1d31335e2c90348Christopher Ferris 352153d92765bb693541abf49a2a1d31335e2c90348Christopher Ferris# ----------------------------------------------------------------------------- 353f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Tests for the device linked against bionic's static library. Run with: 354f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# adb shell /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static 3557be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 356f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests-static_whole_static_libraries := \ 357f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libBionicTests \ 358124fae9eabd7a25d80dfa8c3b56bed0f0fba16f1Elliott Hughes 359f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests-static_static_libraries := \ 3607a39094465bbd01a22565fce1f1155c762f8d145Dan Albert libstlport_static \ 361f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libm \ 362f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libc \ 3637a39094465bbd01a22565fce1f1155c762f8d145Dan Albert libstdc++ \ 364f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 365f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests-static_force_static_executable := true 366f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 367f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := bionic-unit-tests-static 368f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 3695090964da02c956f099a49b5a3eb732c0085c58bChristopher Ferrisbionic-unit-tests-static_multilib := both 370f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := target 371f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := NATIVE_TEST 372f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 373124fae9eabd7a25d80dfa8c3b56bed0f0fba16f1Elliott Hughes 3747be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 375f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# Tests to run on the host and linked against glibc. Run with: 376f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris# cd bionic/tests; mm bionic-unit-tests-glibc-run 3777be369d4c60e9df2316fdb6c73181a40020abef2Elliott Hughes# ----------------------------------------------------------------------------- 378156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanov 379156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanovifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86) 380156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanov 3816b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanovbionic-unit-tests-glibc_src_files := \ 3826b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov atexit_test.cpp \ 3836b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov 384f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests-glibc_whole_static_libraries := \ 385f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris libBionicStandardTests \ 386124fae9eabd7a25d80dfa8c3b56bed0f0fba16f1Elliott Hughes 387f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbionic-unit-tests-glibc_ldlibs := \ 3886b56691a678420477595a531b2d2829980eb51c0Dmitriy Ivanov -lrt -ldl \ 389f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferris 3906396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanovbionic-unit-tests-glibc_cppflags := \ 3916396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanov $(test_cppflags) 3926396da98cb3313048ae9a8147523ed61f675fd50Dmitriy Ivanov 393f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule := bionic-unit-tests-glibc 394f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrismodule_tag := optional 3950e9d7fccb9c3b688992f2ef9ac1cfd1f456b1ed7Calin Juravlebionic-unit-tests-glibc_multilib := both 396f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_type := host 397f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisbuild_target := NATIVE_TEST 398f04935c85e0b466f0d30d2cd4c0fa2fff62e7d6dChristopher Ferrisinclude $(LOCAL_PATH)/Android.build.mk 399b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris 4000c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughesifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86)) 4010c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott HughesLINKER = linker64 4020c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott HughesNATIVE_TEST_SUFFIX=64 4030c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hugheselse 4040c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott HughesLINKER = linker 4050c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott HughesNATIVE_TEST_SUFFIX=32 4060c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughesendif 4070c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughes 408b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris# gtest needs ANDROID_DATA/local/tmp for death test output. 409b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris# Make sure to create ANDROID_DATA/local/tmp if doesn't exist. 410b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris# Use the current target out directory as ANDROID_DATA. 411722706672617d009279a8485b895bd3389de0396Calin Juravle# BIONIC_TEST_FLAGS is either empty or it comes from the user. 412b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferrisbionic-unit-tests-glibc-run: bionic-unit-tests-glibc 413b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris mkdir -p $(TARGET_OUT_DATA)/local/tmp 414b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris ANDROID_DATA=$(TARGET_OUT_DATA) \ 415b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris ANDROID_ROOT=$(TARGET_OUT) \ 416156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanov $(HOST_OUT_EXECUTABLES)/bionic-unit-tests-glibc$(NATIVE_TEST_SUFFIX) $(BIONIC_TEST_FLAGS) 4175ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Goby 41816d1af167f8e36a9aa4a07ae77034ad519b00463Nick Kralevich# ----------------------------------------------------------------------------- 419f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin# Run the unit tests built against x86 bionic on an x86 host. 420f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin# ----------------------------------------------------------------------------- 421156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanov 4220c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughesifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) 423b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris# gtest needs ANDROID_DATA/local/tmp for death test output. 424b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris# Make sure to create ANDROID_DATA/local/tmp if doesn't exist. 425f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin# bionic itself should always work relative to ANDROID_DATA or ANDROID_ROOT. 426722706672617d009279a8485b895bd3389de0396Calin Juravle# BIONIC_TEST_FLAGS is either empty or it comes from the user. 42717558dec7fc60775c940be0e494b42829f35e0b1Pavel Chupinbionic-unit-tests-run-on-host: bionic-unit-tests $(TARGET_OUT_EXECUTABLES)/$(LINKER) $(TARGET_OUT_EXECUTABLES)/sh 428b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris if [ ! -d /system -o ! -d /system/bin ]; then \ 429b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris echo "Attempting to create /system/bin"; \ 430b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris sudo mkdir -p -m 0777 /system/bin; \ 431b38e4d536f6592cf22b984c143ee6790d6df2351Christopher Ferris fi 432f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin mkdir -p $(TARGET_OUT_DATA)/local/tmp 43317558dec7fc60775c940be0e494b42829f35e0b1Pavel Chupin cp $(TARGET_OUT_EXECUTABLES)/$(LINKER) /system/bin 434e60c4f0a6cb5836caa8d0de299cc83fe4b13744cElliott Hughes cp $(TARGET_OUT_EXECUTABLES)/sh /system/bin 435f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin ANDROID_DATA=$(TARGET_OUT_DATA) \ 436f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin ANDROID_ROOT=$(TARGET_OUT) \ 437f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin LD_LIBRARY_PATH=$(TARGET_OUT_SHARED_LIBRARIES) \ 438156c3afcf178b8a6c29b9edc7e8d13999a58d857Dmitriy Ivanov $(TARGET_OUT_DATA_NATIVE_TESTS)/bionic-unit-tests/bionic-unit-tests$(NATIVE_TEST_SUFFIX) $(BIONIC_TEST_FLAGS) 439f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupinendif 4400c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughes 4410c567f1e6cfceada98ba10deb4bac6030c9d20f7Elliott Hughesendif # linux-x86 442f22fb68751c4040f3335cb0bd2d47f87c3ee1aacPavel Chupin 4435ac9eee1d3291a0d203a125849b4636a11c0d124Benoit Gobyendif # !BUILD_TINY_ANDROID 444