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("//build/test.gni") 15import("//foundation/communication/bluetooth_service/bluetooth.gni") 16 17module_output_path = "bluetooth/framework_test/hid" 18 19############################################################################### 20#1. intent(c++) get/set test without transport 21 22config("module_private_config") { 23 visibility = [ ":*" ] 24 cflags = [] 25 if (target_cpu == "arm") { 26 cflags += [ "-DBINDER_IPC_32BIT" ] 27 } 28 include_dirs = [ 29 "mock/include", 30 "//third_party/json/include", 31 "//third_party/bounds_checking_function/include", 32 "//utils/system/safwk/native/include", 33 ] 34 defines = [ 35 "BTFW_LOG_TAG = \"bluetooth_test\"", 36 "BTFW_LOG_DOMAIN = 0xD000103", 37 ] 38} 39 40ohos_moduletest("btfw_hid_unit_test") { 41 module_out_path = module_output_path 42 sources = [ "hid_host_test.cpp" ] 43 44 configs = [ ":module_private_config" ] 45 46 deps = [ 47 "//third_party/bounds_checking_function:libsec_shared", 48 "//third_party/googletest:gmock_main", 49 "//third_party/googletest:gtest_main", 50 "//third_party/libxml2:xml2", 51 ] 52 53 external_deps = [ 54 "bluetooth:btframework", 55 "c_utils:utils", 56 "hilog:libhilog", 57 "ipc:ipc_core", 58 "resource_management:global_resmgr", 59 ] 60} 61 62################################################################################ 63group("unittest") { 64 testonly = true 65 66 deps = [] 67 68 if (is_phone_product && bluetooth_service_hid_host_feature) { 69 deps += [ ":btfw_hid_unit_test" ] 70 } 71} 72