• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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/test.gni")
15import("../../../access_token.gni")
16
17config("accesstoken_test_config") {
18  include_dirs = [
19    "${access_token_path}/interfaces/innerkits/accesstoken/include",
20    "${access_token_path}/interfaces/innerkits/privacy/include",
21    "../../accesstoken/include",
22    "../../common/include",
23    "../../privacy/include",
24  ]
25}
26
27ohos_unittest("libaccesstoken_framework_test") {
28  subsystem_name = "accesscontrol"
29  module_out_path = module_output_path_unittest_accesstoken
30  sanitize = {
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34  }
35  branch_protector_ret = "pac_ret"
36
37  sources = [
38    "accesstoken_parcel_test.cpp",
39    "common_test.cpp",
40    "privacy_parcel_test.cpp",
41  ]
42
43  configs = [
44    ":accesstoken_test_config",
45    "${access_token_path}/config:coverage_flags",
46  ]
47
48  deps = [
49    "../../accesstoken:accesstoken_communication_adapter_cxx",
50    "../../common:accesstoken_common_cxx",
51    "../../privacy:privacy_communication_adapter_cxx",
52  ]
53
54  external_deps = [
55    "c_utils:utils",
56    "ipc:ipc_single",
57    "openssl:libcrypto_shared",
58  ]
59}
60
61group("unittest") {
62  testonly = true
63  deps = [ ":libaccesstoken_framework_test" ]
64}
65