# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/test.gni") import("//base/security/asset/asset.gni") module_output_path = "asset/asset_UT_test" ohos_rust_unittest("asset_module_test") { sources = [ "src/lib.rs" ] deps = [ "../../../frameworks/definition:asset_definition", "../../../services/crypto_manager:asset_crypto_manager", "../../../services/constants:asset_constants", ] external_deps = [ "access_token:libnativetoken", "access_token:libtoken_setproc", "hilog:libhilog", ] module_out_path = module_output_path subsystem_name = "security" part_name = "asset" } ohos_unittest("asset_dependency_test") { module_out_path = module_output_path subsystem_name = "security" part_name = "asset" include_dirs = [ "inc", "../../../interfaces/kits/c/inc", "../../../services/os_dependency/inc", "../../../services/crypto_manager/src", ] sources = [ "src/bms_wrapper_test.cpp", "src/os_account_wrapper_test.cpp", "src/samgr_wrapper_test.cpp", "src/system_ability_wrapper_test.cpp", "src/system_event_wrapper_test.cpp", ] if (enable_local_test) { sources += ["src/huks_wrapper_test.cpp"] } deps = [ "../../../services/os_dependency:asset_os_dependency", "../../../frameworks/os_dependency/samgr:asset_samgr", "../../../services/crypto_manager:asset_huks_wrapper" ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", "huks:libhukssdk", ] }