• 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("//build/test.gni")
15
16module_output_path = "bluetooth/framework_test/gatt_c/"
17SUBSYSTEM_DIR = "//foundation/communication"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21  include_dirs = [
22    "//third_party/json/include",
23    "//commonlibrary/c_utils/base/include",
24    "//utils/system/safwk/native/include",
25    "//foundation/communication/bluetooth/interfaces/inner_api/include",
26    "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header",
27    "//foundation/communication/bluetooth/frameworks/inner/common",
28  ]
29  defines = [
30    "BTFW_LOG_TAG = \"bluetooth_test\"",
31    "BTFW_LOG_DOMAIN = 0xD000103",
32  ]
33}
34
35ohos_unittest("btfw_gatt_c_unit_test") {
36  module_out_path = module_output_path
37
38  sources = [ "gatt_c_test.cpp" ]
39
40  configs = [ ":module_private_config" ]
41
42  deps = [
43    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner:btframework",
44    "//base/global/resource_management/frameworks/resmgr:global_resmgr",
45    "//third_party/googletest:gtest_main",
46  ]
47
48  external_deps = [
49    "c_utils:utils",
50    "hiviewdfx_hilog_native:libhilog",
51  ]
52}
53
54ohos_unittest("btfw_gatt_client_c_unit_test") {
55  module_out_path = module_output_path
56
57  sources = [ "gatt_client_c_test.cpp" ]
58
59  configs = [ ":module_private_config" ]
60
61  deps = [
62    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner:btframework",
63    "//base/global/resource_management/frameworks/resmgr:global_resmgr",
64    "//third_party/googletest:gtest_main",
65  ]
66
67  external_deps = [
68    "c_utils:utils",
69    "hiviewdfx_hilog_native:libhilog",
70  ]
71}
72
73group("unittest") {
74  testonly = true
75
76  deps = []
77
78  if (is_phone_product) {
79    deps += [
80      ":btfw_gatt_c_unit_test",
81      ":btfw_gatt_client_c_unit_test",
82    ]
83  }
84}
85