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("//build/ohos.gni") 15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17config("hdf_test_common_pub_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ "//drivers/hdf_core/framework/test/unittest/include" ] 21} 22if (defined(ohos_lite)) { 23 ohos_shared_library("libhdf_test_common") { 24 output_extension = "z.so" 25 sources = [ 26 "//drivers/hdf_core/framework/test/unittest/common/hdf_common_test.c", 27 ] 28 29 include_dirs = [ 30 "//third_party/bounds_checking_function/include", 31 "//drivers/hdf_core/framework/include/platform", 32 "//drivers/hdf_core/framework/include/core", 33 "//drivers/hdf_core/framework/include/osal", 34 "//drivers/hdf_core/framework/include/utils", 35 "//drivers/hdf_core/adapter/uhdf/posix/include", 36 "//drivers/hdf_core/framework/test/unittest/include", 37 ] 38 39 ldflags = [ 40 "-lstdc++", 41 "-lm", 42 "-pthread", 43 ] 44 45 deps = [ 46 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 47 "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 48 "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 49 ] 50 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 51 } 52} else { 53 ohos_shared_library("libhdf_test_common") { 54 public_configs = [ ":hdf_test_common_pub_config" ] 55 sources = [ 56 "//drivers/hdf_core/framework/test/unittest/common/hdf_common_test.c", 57 ] 58 59 include_dirs = [ "//drivers/hdf_core/framework/test/unittest/include" ] 60 61 deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ] 62 defines = [ "__OHOS__USER__" ] 63 install_images = [ chipset_base_dir ] 64 subsystem_name = "hdf" 65 part_name = "hdf_core" 66 if (is_standard_system) { 67 external_deps = [ 68 "c_utils:utils", 69 "hiviewdfx_hilog_native:libhilog", 70 ] 71 } else { 72 external_deps = [ "hilog:libhilog" ] 73 } 74 } 75} 76