• 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("print_fwk_inner_napi_test") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "mock",
23    "../service_test/mock",
24    "${print_path}/frameworks/innerkitsimpl/print_impl/include",
25    "${print_path}/frameworks/models/print_models/include",
26    "${print_path}/services/print_service/include",
27    "${print_utils_path}/include",
28    "//third_party/node/src",
29  ]
30
31  sanitize = {
32    cfi = true
33    cfi_cross_dso = true
34    debug = false
35    blocklist = "${print_path}/cfi_blocklist.txt"
36  }
37
38  sources = [
39    "print_attributes_test.cpp",
40    "print_extension_callback_stub_test.cpp",
41    "print_extension_info_test.cpp",
42    "print_job_test.cpp",
43    "print_margin_test.cpp",
44    "print_page_size_test.cpp",
45    "print_preview_attribute_test.cpp",
46    "print_range_test.cpp",
47    "print_resolution_test.cpp",
48    "print_sa_death_recipient_test.cpp",
49    "print_utils_test.cpp",
50    "printer_capability_test.cpp",
51    "printer_info_test.cpp",
52    "printer_preferences_test.cpp",
53  ]
54
55  deps = [
56    "${print_path}/etc/init:printservice.rc",
57    "${print_path}/frameworks/helper/print_helper:print_helper",
58    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
59    "${print_path}/frameworks/kits/extension:print_extension_framework",
60    "${print_path}/frameworks/kits/extension:print_extension_module",
61    "${print_path}/frameworks/models/print_models:print_models",
62    "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi",
63    "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi",
64    "${print_path}/interfaces/kits/napi/print_napi:print_napi",
65    "${print_path}/profile:print_sa_profiles",
66    "${print_path}/services/print_service:print_service_test",
67    "//third_party/googletest:gmock_main",
68  ]
69
70  external_deps = [
71    "ability_base:want",
72    "ability_base:zuri",
73    "ability_runtime:ability_manager",
74    "ability_runtime:abilitykit_native",
75    "ability_runtime:data_ability_helper",
76    "ability_runtime:napi_base_context",
77    "c_utils:utils",
78    "common_event_service:cesfwk_innerkits",
79    "eventhandler:libeventhandler",
80    "hilog:libhilog",
81    "i18n:intl_util",
82    "ipc:ipc_core",
83    "jsoncpp:jsoncpp",
84    "napi:ace_napi",
85    "preferences:native_preferences",
86    "relational_store:native_appdatafwk",
87    "relational_store:native_dataability",
88    "relational_store:native_rdb",
89    "resource_management:global_resmgr",
90    "samgr:samgr_proxy",
91  ]
92}
93
94group("unittest") {
95  testonly = true
96
97  deps = []
98
99  deps += [ ":print_fwk_inner_napi_test" ]
100}
101