1# Copyright (C) 2025 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. 13import("//build/test.gni") 14import("../../../test_template.gni") 15import("test_src_functionalext_adlt.gni") 16 17if (defined(musl_use_adlt) && musl_use_adlt == true) { 18import("adlt_common.gni") 19} 20 21foreach(s, functionalext_adlt_test) { 22 test_unittest(s) { 23 target_dir = "functionalext/adlt" 24 } 25} 26 27group("functionalext_adlt_test") { 28 testonly = true 29 deps = [] 30 31 if (defined(musl_use_adlt) && musl_use_adlt == true) { 32 foreach(s, functionalext_adlt_test) { 33 deps += [ "${s}" ] 34 } 35 } 36} 37 38if (defined(musl_use_adlt) && musl_use_adlt == true) { 39 action("adlt_build_syms") { 40 testonly = true 41 script = "//third_party/musl/libc-test/src/functionalext/adlt/adlt_tools.py" 42 args = [ "build_sym_script", "--lib-dir", rebase_path(adlt_lib_dir, ""), "--target-lib-dir", adlt_target_lib_dir ] 43 outputs = [ "$adlt_lib_dir/adlt_build_syms.sh" ] 44 } 45 46 ohos_static_library("adlt_common") { 47 testonly = true 48 subsystem_name = "thirdparty" 49 part_name = "musl" 50 51 include_dirs = [ 52 "//third_party/musl/libc-test/src/functionalext/common", 53 "//third_party/musl/porting/linux/user/include", 54 "//third_party/musl/libc-test/src/common", 55 "common" 56 ] 57 configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ] 58 sources = [ "common/adlt_common.cpp" ] 59 } 60}