• 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_cups_client_test") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "${print_path}/frameworks/innerkitsimpl/print_impl/include",
23    "${print_path}/frameworks/models/print_models/include",
24    "${print_path}/frameworks/ohprint/include",
25    "${print_path}/interfaces/kits/napi/print_napi/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  cflags_cc = []
39
40  deps = [
41    "${print_path}/etc/init:printservice.rc",
42    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
43    "${print_path}/frameworks/kits/extension:print_extension_framework",
44    "${print_path}/frameworks/kits/extension:print_extension_module",
45    "${print_path}/frameworks/models/print_models:print_models",
46    "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi",
47    "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi",
48    "${print_path}/interfaces/kits/napi/print_napi:print_napi",
49    "${print_path}/profile:print_sa_profiles",
50    "${print_path}/services/print_service:print_service_test",
51  ]
52
53  external_deps = [
54    "ability_base:base",
55    "ability_base:want",
56    "ability_base:zuri",
57    "ability_runtime:ability_manager",
58    "ability_runtime:abilitykit_native",
59    "access_token:libaccesstoken_sdk",
60    "access_token:libnativetoken",
61    "access_token:libtoken_setproc",
62    "bundle_framework:appexecfwk_base",
63    "bundle_framework:appexecfwk_core",
64    "c_utils:utils",
65    "drivers_interface_usb:libusb_proxy_1.0",
66    "googletest:gmock_main",
67    "hilog:libhilog",
68    "ipc:ipc_core",
69    "jsoncpp:jsoncpp",
70    "napi:ace_napi",
71    "openssl:libssl_shared",
72    "os_account:os_account_innerkits",
73    "safwk:system_ability_fwk",
74    "samgr:samgr_proxy",
75    "usb_manager:usbsrv_client",
76  ]
77
78  if (cups_enable) {
79    sources += [
80      "print_cups_client_test.cpp",
81      "print_cups_wrapper_test.cpp",
82    ]
83    cflags_cc += [ "-DCUPS_ENABLE" ]
84    external_deps += [
85      "cJSON:cjson",
86      "cups:cups",
87      "cups-filters:cupsfilters",
88    ]
89  }
90
91  if (print_fwk_feature_enterprise) {
92    cflags_cc += [ "-DENTERPRISE_ENABLE" ]
93  }
94}
95
96group("unittest") {
97  testonly = true
98
99  deps = []
100
101  deps += [ ":fwk_print_cups_client_test" ]
102}
103