• 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")
15import("//foundation/barrierfree/accessibility/accessibility_aafwk.gni")
16
17module_output_path = "accessibility/framework_test"
18
19###############################################################################
20config("module_private_config") {
21  visibility = [ ":*" ]
22  cflags = []
23  if (target_cpu == "arm") {
24    cflags += [ "-DBINDER_IPC_32BIT" ]
25  }
26
27  include_dirs = [
28    "${ability_base_path}/interfaces/inner_api/base/include",
29    "${ability_base_path}/interfaces/kits/native/uri/include",
30    "${ability_base_path}/interfaces/kits/native/want/include",
31    "//base/notification/common_event_service/interfaces/inner_api",
32    "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
33    "//base/powermgr/power_manager/interfaces/innerkits/native/include",
34    "//foundation/barrierfree/accessibility/services/interface/include",
35    "//foundation/barrierfree/accessibility/frameworks/acfwk/include",
36    "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk/include",
37    "//foundation/barrierfree/accessibility/services/aams/test/mock/include",
38    "//foundation/barrierfree/accessibility/services/test/mock",
39    "//foundation/barrierfree/accessibility/common/log/include",
40    "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include",
41    "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include",
42    "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr",
43    "//third_party/json/include",
44  ]
45  defines = [
46    "AAMS_LOG_TAG = \"accessibility_test\"",
47    "AAMS_LOG_DOMAIN = 0xD001D05",
48  ]
49}
50
51ohos_unittest("ac_unit_test") {
52  module_out_path = module_output_path
53  sources = [
54    "../src/accessibility_config.cpp",
55    "../src/accessibility_config_impl.cpp",
56    "//foundation/barrierfree/accessibility/services/test/mock/mock_accessible_ability_manager_service_stub.cpp",
57    "//foundation/barrierfree/accessibility/services/test/mock/mock_parameter.c",
58    "mock/src/mock_service_registry.cpp",
59    "unittest/accessibility_config_impl_test.cpp",
60  ]
61
62  configs = [
63    ":module_private_config",
64    "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
65  ]
66
67  deps = [
68    "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
69    "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
70    "//third_party/googletest:gmock_main",
71    "//third_party/googletest:gtest_main",
72  ]
73
74  external_deps = [
75    "c_utils:utils",
76    "display_manager:displaymgr",
77    "eventhandler:libeventhandler",
78    "hiviewdfx_hilog_native:libhilog",
79    "ipc:ipc_core",
80    "samgr:samgr_proxy",
81  ]
82}
83
84###############################################################################
85
86group("unittest") {
87  testonly = true
88  deps = []
89
90  deps += [ ":ac_unit_test" ]
91}
92###############################################################################
93