• 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("//base/print/print_fwk/print.gni")
15import("//build/test.gni")
16
17module_output_path = unit_test_output_path
18
19ohos_unittest("fwk_print_service_ability_test") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "../fwk_inner_napi_test/mock",
23    "../service_test/mock",
24    "${print_path}/frameworks/models/print_models/include",
25    "${print_path}/frameworks/ohprint/include",
26    "${print_path}/services/print_service/include",
27    "${print_utils_path}/include",
28  ]
29
30  sanitize = {
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34    blocklist = "${print_path}/cfi_blocklist.txt"
35  }
36
37  sources = [
38    "print_service_ability_test.cpp",
39    "print_service_mock_permission.cpp",
40  ]
41
42  cflags_cc = []
43  if (print_fwk_feature_enterprise) {
44    cflags_cc += [ "-DENTERPRISE_ENABLE" ]
45  }
46
47  deps = [
48    "${print_path}/etc/init:printservice.rc",
49    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
50    "${print_path}/frameworks/kits/extension:print_extension_framework",
51    "${print_path}/frameworks/kits/extension:print_extension_module",
52    "${print_path}/frameworks/models/print_models:print_models",
53    "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi",
54    "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi",
55    "${print_path}/interfaces/kits/napi/print_napi:print_napi",
56    "${print_path}/profile:print_sa_profiles",
57    "${print_path}/services/print_service:print_service_test",
58  ]
59
60  external_deps = [
61    "ability_base:base",
62    "ability_base:want",
63    "ability_base:zuri",
64    "ability_runtime:ability_manager",
65    "ability_runtime:abilitykit_native",
66    "access_token:libaccesstoken_sdk",
67    "access_token:libnativetoken",
68    "access_token:libtoken_setproc",
69    "bounds_checking_function:libsec_shared",
70    "bundle_framework:appexecfwk_base",
71    "bundle_framework:appexecfwk_core",
72    "cJSON:cjson",
73    "c_utils:utils",
74    "drivers_interface_usb:libusb_proxy_1.0",
75    "googletest:gmock_main",
76    "hilog:libhilog",
77    "ipc:ipc_core",
78    "jsoncpp:jsoncpp",
79    "napi:ace_napi",
80    "os_account:os_account_innerkits",
81    "safwk:system_ability_fwk",
82    "samgr:samgr_proxy",
83    "selinux_adapter:librestorecon",
84    "usb_manager:usbsrv_client",
85  ]
86}
87
88group("unittest") {
89  testonly = true
90
91  deps = []
92
93  deps += [ ":fwk_print_service_ability_test" ]
94}
95