119e95205Sopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd.
219e95205Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
319e95205Sopenharmony_ci# you may not use this file except in compliance with the License.
419e95205Sopenharmony_ci# You may obtain a copy of the License at
519e95205Sopenharmony_ci#
619e95205Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
719e95205Sopenharmony_ci#
819e95205Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
919e95205Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1019e95205Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1119e95205Sopenharmony_ci# See the License for the specific language governing permissions and
1219e95205Sopenharmony_ci# limitations under the License.
1319e95205Sopenharmony_ci
1419e95205Sopenharmony_ciimport("//build/test.gni")
1519e95205Sopenharmony_ci
1619e95205Sopenharmony_cimodule_output_path = "bluetooth/server_test"
1719e95205Sopenharmony_ci
1819e95205Sopenharmony_ci###############################################################################
1919e95205Sopenharmony_ci#1. intent(c++) get/set test without transport
2019e95205Sopenharmony_ci
2119e95205Sopenharmony_ciconfig("module_private_config") {
2219e95205Sopenharmony_ci  visibility = [ ":*" ]
2319e95205Sopenharmony_ci  cflags = []
2419e95205Sopenharmony_ci  if (target_cpu == "arm") {
2519e95205Sopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
2619e95205Sopenharmony_ci  }
2719e95205Sopenharmony_ci  include_dirs = [
2819e95205Sopenharmony_ci    "mock/include",
2919e95205Sopenharmony_ci    "//third_party/json/include",
3019e95205Sopenharmony_ci    "//third_party/bounds_checking_function/include",
3119e95205Sopenharmony_ci    "//utils/system/safwk/native/include",
3219e95205Sopenharmony_ci    "//foundation/communication/bluetooth_service/services/bluetooth/service/src/common",
3319e95205Sopenharmony_ci    "//foundation/communication/bluetooth_service/services/bluetooth/service/src/",
3419e95205Sopenharmony_ci    "//foundation/communication/bluetooth_service/services/bluetooth/service/src/base",
3519e95205Sopenharmony_ci  ]
3619e95205Sopenharmony_ci  defines = [
3719e95205Sopenharmony_ci    "BTFW_LOG_TAG = \"bluetooth_test\"",
3819e95205Sopenharmony_ci    "BTFW_LOG_DOMAIN = 0xD000103",
3919e95205Sopenharmony_ci  ]
4019e95205Sopenharmony_ci}
4119e95205Sopenharmony_ci
4219e95205Sopenharmony_ciohos_moduletest("btsvr_module_test") {
4319e95205Sopenharmony_ci  module_out_path = module_output_path
4419e95205Sopenharmony_ci  sources = [ "moduletest/hosttest/host_srv_module_test.cpp" ]
4519e95205Sopenharmony_ci
4619e95205Sopenharmony_ci  configs = [ ":module_private_config" ]
4719e95205Sopenharmony_ci
4819e95205Sopenharmony_ci  deps = [
4919e95205Sopenharmony_ci    "//foundation/communication/bluetooth_service/services/bluetooth/server:bluetooth_server",
5019e95205Sopenharmony_ci    "//foundation/communication/bluetooth_service/services/bluetooth/service:btservice",
5119e95205Sopenharmony_ci    "//third_party/bounds_checking_function:libsec_shared",
5219e95205Sopenharmony_ci    "//third_party/googletest:gmock_main",
5319e95205Sopenharmony_ci    "//third_party/googletest:gtest_main",
5419e95205Sopenharmony_ci  ]
5519e95205Sopenharmony_ci
5619e95205Sopenharmony_ci  external_deps = [
5719e95205Sopenharmony_ci    "c_utils:utils",
5819e95205Sopenharmony_ci    "hilog:libhilog",
5919e95205Sopenharmony_ci    "ipc:ipc_core",
6019e95205Sopenharmony_ci    "resource_management:global_resmgr",
6119e95205Sopenharmony_ci  ]
6219e95205Sopenharmony_ci}
6319e95205Sopenharmony_ci
6419e95205Sopenharmony_ci################################################################################
6519e95205Sopenharmony_cigroup("moduletest") {
6619e95205Sopenharmony_ci  testonly = true
6719e95205Sopenharmony_ci
6819e95205Sopenharmony_ci  deps = []
6919e95205Sopenharmony_ci
7019e95205Sopenharmony_ci  if (is_phone_product) {
7119e95205Sopenharmony_ci    deps += [ ":btsvr_module_test" ]
7219e95205Sopenharmony_ci  }
7319e95205Sopenharmony_ci}
74