1# Copyright (c) 2024 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_vendor_manager_test") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "${print_path}/frameworks/models/print_models/include", 23 "${print_path}/frameworks/ohprint/include", 24 "${print_path}/services/print_service/include", 25 "${print_utils_path}/include", 26 ] 27 28 sanitize = { 29 cfi = true 30 cfi_cross_dso = true 31 debug = false 32 blocklist = "${print_path}/cfi_blocklist.txt" 33 } 34 35 sources = [ 36 "operation_queue_test.cpp", 37 "vendor_bsuni_driver_test.cpp", 38 "vendor_helper_test.cpp", 39 "vendor_ipp_everywhere_test.cpp", 40 "vendor_manager_test.cpp", 41 "vendor_ppd_driver_test.cpp", 42 "vendor_wlan_group_test.cpp", 43 ] 44 cflags_cc = [] 45 if (print_fwk_feature_enterprise) { 46 cflags_cc += [ "-DENTERPRISE_ENABLE" ] 47 } 48 49 deps = [ 50 "${print_path}/etc/init:printservice.rc", 51 "${print_path}/frameworks/innerkitsimpl/print_impl:print_client", 52 "${print_path}/frameworks/kits/extension:print_extension_framework", 53 "${print_path}/frameworks/kits/extension:print_extension_module", 54 "${print_path}/frameworks/models/print_models:print_models", 55 "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi", 56 "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi", 57 "${print_path}/interfaces/kits/napi/print_napi:print_napi", 58 "${print_path}/profile:print_sa_profiles", 59 "${print_path}/services/print_service:print_service_test", 60 ] 61 62 external_deps = [ 63 "ability_base:base", 64 "ability_base:want", 65 "ability_base:zuri", 66 "ability_runtime:ability_manager", 67 "ability_runtime:abilitykit_native", 68 "access_token:libaccesstoken_sdk", 69 "access_token:libnativetoken", 70 "access_token:libtoken_setproc", 71 "bounds_checking_function:libsec_shared", 72 "bundle_framework:appexecfwk_base", 73 "bundle_framework:appexecfwk_core", 74 "c_utils:utils", 75 "drivers_interface_usb:libusb_proxy_1.0", 76 "googletest:gmock_main", 77 "hilog:libhilog", 78 "ipc:ipc_core", 79 "napi:ace_napi", 80 "os_account:os_account_innerkits", 81 "selinux_adapter:librestorecon", 82 "safwk:system_ability_fwk", 83 "samgr:samgr_proxy", 84 "usb_manager:usbsrv_client", 85 ] 86 87 if (cups_enable) { 88 cflags_cc += [ "-DCUPS_ENABLE" ] 89 external_deps += [ 90 "cJSON:cjson", 91 "cups:cups", 92 "cups-filters:cupsfilters", 93 ] 94 } 95} 96 97group("unittest") { 98 testonly = true 99 100 deps = [] 101 102 deps += [ ":fwk_vendor_manager_test" ] 103} 104