• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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")
16
17# test unittest
18ohos_unittest("dslm_test") {
19  install_enable = true
20  testonly = true
21  part_name = "device_security_level"
22  subsystem_name = "security"
23  module_out_path = "${part_name}/${target_name}"
24
25  sources = [
26    "//base/security/device_security_level/oem_property/ohos/dslm_ohos_credential.c",
27    "//base/security/device_security_level/services/sa/common/dslm_rpc_process.c",
28    "dslm_baselib_utils_test.cpp",
29    "dslm_msg_interface_mock.cpp",
30    "dslm_oem_property_test.cpp",
31    "dslm_request_callback_mock.cpp",
32    "dslm_rpc_process_test.cpp",
33    "dslm_test.cpp",
34  ]
35
36  include_dirs = [
37    "//base/security/device_security_level/common/include",
38    "//base/security/device_security_level/interfaces/inner_api/include",
39    "//base/security/device_security_level/interfaces/inner_api/src/standard",
40    "//base/security/device_security_level/services/include",
41    "//base/security/device_security_level/services/dslm",
42    "//base/security/device_security_level/services/sa/common",
43    "//base/security/device_security_level/baselib/msglib/include",
44    "//base/security/device_security_level/oem_property/common",
45    "//base/security/device_security_level/oem_property/ohos/impl",
46  ]
47
48  configs = [ "//base/security/device_security_level/common:common_configs" ]
49
50  deps = [
51    "//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
52    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
53    "//base/security/device_security_level/baselib/utils:utils_static",
54    "//base/security/device_security_level/oem_property/ohos:dslm_ohos_cred_obj",
55    "//base/security/device_security_level/services/common:service_common_obj",
56    "//base/security/device_security_level/services/dslm:service_dslm_test_obj",
57    "//base/security/device_security_level/services/msg:service_msg_obj",
58    "//third_party/googletest:gmock",
59  ]
60
61  external_deps = [
62    "c_utils:utils",
63    "device_security_level:dslm_sdk",
64    "hilog_native:libhilog",
65    "huks:libhukssdk",
66  ]
67}
68