1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("../../../test_template.gni") 15 16test_unittest("ldso_randomization_test") { 17 target_dir = "functionalext/ldso_randomization" 18} 19 20test_unittest("ldso_randomization_manual") { 21 target_dir = "functionalext/ldso_randomization" 22} 23 24ohos_shared_library("ldso_randomization_dep_e") { 25 include_dirs = [ "." ] 26 27 sources = [ "ldso_randomization_dep_e.c" ] 28 29 output_name = "ldso_randomization_dep_e" 30 31 output_extension = "so" 32 33 subsystem_name = "musl" 34 part_name = "libc-test-lib" 35} 36 37ohos_shared_library("ldso_randomization_dep_d") { 38 include_dirs = [ "." ] 39 40 sources = [ "ldso_randomization_dep_d.c" ] 41 42 output_name = "ldso_randomization_dep_d" 43 44 output_extension = "so" 45 46 subsystem_name = "musl" 47 part_name = "libc-test-lib" 48} 49 50ohos_shared_library("ldso_randomization_dep_c") { 51 include_dirs = [ "." ] 52 53 sources = [ "ldso_randomization_dep_c.c" ] 54 55 output_name = "ldso_randomization_dep_c" 56 57 output_extension = "so" 58 59 subsystem_name = "musl" 60 part_name = "libc-test-lib" 61} 62 63ohos_shared_library("ldso_randomization_dep_b") { 64 include_dirs = [ "." ] 65 66 sources = [ "ldso_randomization_dep_b.c" ] 67 68 output_name = "ldso_randomization_dep_b" 69 70 output_extension = "so" 71 72 deps = [ 73 ":ldso_randomization_dep_d", 74 ":ldso_randomization_dep_e", 75 ] 76 77 subsystem_name = "musl" 78 part_name = "libc-test-lib" 79} 80 81ohos_shared_library("ldso_randomization_dep_a") { 82 include_dirs = [ "." ] 83 84 sources = [ "ldso_randomization_dep_a.c" ] 85 86 output_name = "ldso_randomization_dep_a" 87 88 output_extension = "so" 89 90 deps = [ 91 ":ldso_randomization_dep_b", 92 ":ldso_randomization_dep_c", 93 ] 94 95 subsystem_name = "musl" 96 part_name = "libc-test-lib" 97} 98 99ohos_shared_library("ldso_randomization_dep") { 100 include_dirs = [ "." ] 101 102 sources = [ "ldso_randomization_dep.c" ] 103 104 output_name = "ldso_randomization_dep" 105 106 output_extension = "so" 107 108 subsystem_name = "musl" 109 part_name = "libc-test-lib" 110} 111 112group("functionalext_ldso_randomization_test") { 113 testonly = true 114 deps = [ 115 ":ldso_randomization_dep", 116 ":ldso_randomization_dep_a", 117 ":ldso_randomization_manual", 118 ":ldso_randomization_test", 119 ] 120} 121