1# Copyright (c) 2023 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("//base/security/asset/config.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17 18module_output_path = "asset/asset_UT_test" 19 20ohos_rust_unittest("asset_module_test") { 21 sources = [ "src/lib.rs" ] 22 deps = [ 23 "../../../frameworks/definition:asset_definition", 24 "../../../services/common:asset_common", 25 "../../../services/crypto_manager:asset_crypto_manager", 26 ] 27 external_deps = [ 28 "access_token:libnativetoken", 29 "access_token:libtoken_setproc", 30 "hilog:libhilog", 31 ] 32 module_out_path = module_output_path 33 subsystem_name = "security" 34 part_name = "asset" 35} 36 37ohos_unittest("asset_dependency_test") { 38 module_out_path = module_output_path 39 subsystem_name = "security" 40 part_name = "asset" 41 include_dirs = [ 42 "inc", 43 "../../../interfaces/inner_kits/c/inc", 44 "../../../interfaces/kits/c/inc", 45 "../../../services/os_dependency/inc", 46 "../../../services/crypto_manager/src", 47 "../common/inc", 48 ] 49 sources = [] 50 if (enable_local_test) { 51 sources += [ "src/asset_system_api_test.cpp" ] 52 sources += [ "src/huks_wrapper_test.cpp" ] 53 sources += [ "src/bms_wrapper_test.cpp" ] 54 } 55 sources += [ 56 "src/os_account_wrapper_test.cpp", 57 "src/system_ability_wrapper_test.cpp", 58 "src/system_event_wrapper_test.cpp", 59 ] 60 deps = [ 61 "../../../frameworks/c/system_api:asset_sdk", 62 "../../../interfaces/kits/c:asset_ndk", 63 "../../../services/crypto_manager:asset_huks_wrapper", 64 "../../../services/os_dependency:asset_os_dependency", 65 "../common:asset_test_common", 66 ] 67 external_deps = [ 68 "ability_base:want", 69 "access_token:libaccesstoken_sdk", 70 "access_token:libnativetoken", 71 "access_token:libtoken_setproc", 72 "bundle_framework:appexecfwk_base", 73 "bundle_framework:appexecfwk_core", 74 "c_utils:utils", 75 "common_event_service:cesfwk_innerkits", 76 "hilog:libhilog", 77 "huks:libhukssdk", 78 "ipc:ipc_single", 79 "os_account:os_account_innerkits", 80 "samgr:samgr_proxy", 81 ] 82} 83