# 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("//base/security/asset/config.gni") import("//build/ohos.gni") import("//build/test.gni") module_output_path = "asset/asset_UT_test" ohos_rust_unittest("asset_module_test") { sources = [ "src/lib.rs" ] deps = [ "../../../frameworks/definition:asset_definition", "../../../services/common:asset_common", "../../../services/crypto_manager:asset_crypto_manager", ] 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/inner_kits/c/inc", "../../../interfaces/kits/c/inc", "../../../services/os_dependency/inc", "../../../services/crypto_manager/src", "../common/inc", ] sources = [] if (enable_local_test) { sources += [ "src/asset_system_api_test.cpp" ] sources += [ "src/huks_wrapper_test.cpp" ] sources += [ "src/bms_wrapper_test.cpp" ] } sources += [ "src/os_account_wrapper_test.cpp", "src/system_ability_wrapper_test.cpp", "src/system_event_wrapper_test.cpp", ] deps = [ "../../../frameworks/c/system_api:asset_sdk", "../../../interfaces/kits/c:asset_ndk", "../../../services/crypto_manager:asset_huks_wrapper", "../../../services/os_dependency:asset_os_dependency", "../common:asset_test_common", ] 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", "huks:libhukssdk", "ipc:ipc_single", "os_account:os_account_innerkits", "samgr:samgr_proxy", ] }