• 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("//base/security/asset/config.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17
18module_output_path = "asset/asset"
19
20ohos_rust_unittest("rust_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/os_dependency/src",
47    "../../../services/crypto_manager/src",
48    "../common/inc",
49  ]
50  sources = []
51  if (enable_local_test) {
52    sources += [ "src/asset_system_api_test.cpp" ]
53    sources += [ "src/huks_wrapper_test.cpp" ]
54    sources += [ "src/bms_wrapper_test.cpp" ]
55    sources += [ "src/system_ability_wrapper_test.cpp" ]
56    sources += [ "src/system_event_wrapper_test.cpp" ]
57    sources += [ "src/os_account_wrapper_test.cpp" ]
58  }
59  sources += [
60    "src/asset_mem_wrapper_test.cpp",
61    "src/asset_system_api_without_permission_test.cpp",
62  ]
63  deps = [
64    "../../../frameworks/c/system_api:asset_sdk",
65    "../../../frameworks/os_dependency/memory:asset_mem",
66    "../../../interfaces/kits/c:asset_ndk",
67    "../../../services/crypto_manager:asset_huks_wrapper",
68    "../../../services/os_dependency:asset_os_dependency",
69    "../common:asset_test_common",
70  ]
71  external_deps = [
72    "ability_base:want",
73    "access_token:libaccesstoken_sdk",
74    "access_token:libnativetoken",
75    "access_token:libtoken_setproc",
76    "bundle_framework:appexecfwk_base",
77    "bundle_framework:appexecfwk_core",
78    "c_utils:utils",
79    "common_event_service:cesfwk_innerkits",
80    "hilog:libhilog",
81    "huks:libhukssdk",
82    "ipc:ipc_single",
83    "os_account:os_account_innerkits",
84    "samgr:samgr_proxy",
85  ]
86}
87