1dfe32fa1Soh_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
2dfe32fa1Soh_ci# Licensed under the Apache License, Version 2.0 (the "License");
3dfe32fa1Soh_ci# you may not use this file except in compliance with the License.
4dfe32fa1Soh_ci# You may obtain a copy of the License at
5dfe32fa1Soh_ci#
6dfe32fa1Soh_ci#     http://www.apache.org/licenses/LICENSE-2.0
7dfe32fa1Soh_ci#
8dfe32fa1Soh_ci# Unless required by applicable law or agreed to in writing, software
9dfe32fa1Soh_ci# distributed under the License is distributed on an "AS IS" BASIS,
10dfe32fa1Soh_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11dfe32fa1Soh_ci# See the License for the specific language governing permissions and
12dfe32fa1Soh_ci# limitations under the License.
13dfe32fa1Soh_ci
14dfe32fa1Soh_ciimport("//base/security/asset/config.gni")
15dfe32fa1Soh_ciimport("//build/ohos.gni")
16dfe32fa1Soh_ciimport("//build/test.gni")
17dfe32fa1Soh_ci
18dfe32fa1Soh_cimodule_output_path = "asset/asset_UT_test"
19dfe32fa1Soh_ci
20dfe32fa1Soh_ciohos_rust_unittest("asset_module_test") {
21dfe32fa1Soh_ci  sources = [ "src/lib.rs" ]
22dfe32fa1Soh_ci  deps = [
23dfe32fa1Soh_ci    "../../../frameworks/definition:asset_definition",
24dfe32fa1Soh_ci    "../../../services/common:asset_common",
25dfe32fa1Soh_ci    "../../../services/crypto_manager:asset_crypto_manager",
26dfe32fa1Soh_ci  ]
27dfe32fa1Soh_ci  external_deps = [
28dfe32fa1Soh_ci    "access_token:libnativetoken",
29dfe32fa1Soh_ci    "access_token:libtoken_setproc",
30dfe32fa1Soh_ci    "hilog:libhilog",
31dfe32fa1Soh_ci  ]
32dfe32fa1Soh_ci  module_out_path = module_output_path
33dfe32fa1Soh_ci  subsystem_name = "security"
34dfe32fa1Soh_ci  part_name = "asset"
35dfe32fa1Soh_ci}
36dfe32fa1Soh_ci
37dfe32fa1Soh_ciohos_unittest("asset_dependency_test") {
38dfe32fa1Soh_ci  module_out_path = module_output_path
39dfe32fa1Soh_ci  subsystem_name = "security"
40dfe32fa1Soh_ci  part_name = "asset"
41dfe32fa1Soh_ci  include_dirs = [
42dfe32fa1Soh_ci    "inc",
43dfe32fa1Soh_ci    "../../../interfaces/inner_kits/c/inc",
44dfe32fa1Soh_ci    "../../../interfaces/kits/c/inc",
45dfe32fa1Soh_ci    "../../../services/os_dependency/inc",
46dfe32fa1Soh_ci    "../../../services/crypto_manager/src",
47dfe32fa1Soh_ci    "../common/inc",
48dfe32fa1Soh_ci  ]
49dfe32fa1Soh_ci  sources = []
50dfe32fa1Soh_ci  if (enable_local_test) {
51dfe32fa1Soh_ci    sources += [ "src/asset_system_api_test.cpp" ]
52dfe32fa1Soh_ci    sources += [ "src/huks_wrapper_test.cpp" ]
53dfe32fa1Soh_ci    sources += [ "src/bms_wrapper_test.cpp" ]
54dfe32fa1Soh_ci  }
55dfe32fa1Soh_ci  sources += [
56dfe32fa1Soh_ci    "src/os_account_wrapper_test.cpp",
57dfe32fa1Soh_ci    "src/system_ability_wrapper_test.cpp",
58dfe32fa1Soh_ci    "src/system_event_wrapper_test.cpp",
59dfe32fa1Soh_ci  ]
60dfe32fa1Soh_ci  deps = [
61dfe32fa1Soh_ci    "../../../frameworks/c/system_api:asset_sdk",
62dfe32fa1Soh_ci    "../../../interfaces/kits/c:asset_ndk",
63dfe32fa1Soh_ci    "../../../services/crypto_manager:asset_huks_wrapper",
64dfe32fa1Soh_ci    "../../../services/os_dependency:asset_os_dependency",
65dfe32fa1Soh_ci    "../common:asset_test_common",
66dfe32fa1Soh_ci  ]
67dfe32fa1Soh_ci  external_deps = [
68dfe32fa1Soh_ci    "ability_base:want",
69dfe32fa1Soh_ci    "access_token:libaccesstoken_sdk",
70dfe32fa1Soh_ci    "access_token:libnativetoken",
71dfe32fa1Soh_ci    "access_token:libtoken_setproc",
72dfe32fa1Soh_ci    "bundle_framework:appexecfwk_base",
73dfe32fa1Soh_ci    "bundle_framework:appexecfwk_core",
74dfe32fa1Soh_ci    "c_utils:utils",
75dfe32fa1Soh_ci    "common_event_service:cesfwk_innerkits",
76dfe32fa1Soh_ci    "hilog:libhilog",
77dfe32fa1Soh_ci    "huks:libhukssdk",
78dfe32fa1Soh_ci    "ipc:ipc_single",
79dfe32fa1Soh_ci    "os_account:os_account_innerkits",
80dfe32fa1Soh_ci    "samgr:samgr_proxy",
81dfe32fa1Soh_ci  ]
82dfe32fa1Soh_ci}
83