• 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/test.gni")
15import("../../../../dlp_permission_service.gni")
16
17ohos_unittest("dlp_permission_kit_test") {
18  subsystem_name = "security"
19  part_name = "dlp_permission_service"
20  module_out_path = part_name + "/" + part_name
21
22  include_dirs = [
23    "//third_party/json/include",
24    "//third_party/googletest/include",
25    "//third_party/mbedtls/include",
26    "${dlp_root_dir}/frameworks/common/include",
27    "${dlp_root_dir}/frameworks/dlp_permission/include",
28    "${dlp_root_dir}/interfaces/inner_api/dlp_permission/include",
29  ]
30
31  sources = [
32    "${dlp_root_dir}/frameworks/common/src/random_mbedtls.cpp",
33    "unittest/src/dlp_permission_kit_test.cpp" ]
34
35  cflags_cc = [ "-DHILOG_ENABLE" ]
36
37  configs = [ "${dlp_root_dir}/config:coverage_flags" ]
38
39  deps = [
40    "${dlp_root_dir}/interfaces/inner_api/dlp_permission:libdlp_permission_sdk",
41    "//third_party/mbedtls:mbedtls_shared"
42  ]
43
44  external_deps = [
45    "ability_base:want",
46    "access_token:libaccesstoken_sdk",
47    "access_token:libtoken_setproc",
48    "bundle_framework:appexecfwk_base",
49    "bundle_framework:appexecfwk_core",
50    "c_utils:utils",
51    "hilog:libhilog",
52    "ipc:ipc_core",
53  ]
54}
55
56group("unittest") {
57  testonly = true
58  deps = [ ":dlp_permission_kit_test" ]
59}
60