• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/ohos.gni")
15import("//build/test.gni")
16import("//base/security/asset/asset.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/crypto_manager:asset_crypto_manager",
25    "../../../services/constants:asset_constants",
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/kits/c/inc",
44    "../../../services/os_dependency/inc",
45    "../../../services/crypto_manager/src",
46  ]
47  sources = [
48    "src/bms_wrapper_test.cpp",
49    "src/os_account_wrapper_test.cpp",
50    "src/samgr_wrapper_test.cpp",
51    "src/system_ability_wrapper_test.cpp",
52    "src/system_event_wrapper_test.cpp",
53  ]
54  if (enable_local_test) {
55    sources += ["src/huks_wrapper_test.cpp"]
56  }
57  deps = [
58    "../../../services/os_dependency:asset_os_dependency",
59    "../../../frameworks/os_dependency/samgr:asset_samgr",
60    "../../../services/crypto_manager:asset_huks_wrapper"
61  ]
62  external_deps = [
63    "ability_base:want",
64    "access_token:libaccesstoken_sdk",
65    "access_token:libnativetoken",
66    "access_token:libtoken_setproc",
67    "bundle_framework:appexecfwk_base",
68    "bundle_framework:appexecfwk_core",
69    "c_utils:utils",
70    "common_event_service:cesfwk_innerkits",
71    "hilog:libhilog",
72    "ipc:ipc_single",
73    "os_account:os_account_innerkits",
74    "samgr:samgr_proxy",
75    "huks:libhukssdk",
76  ]
77}
78