• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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.
13import("//base/hiviewdfx/hiview/hiview.gni")
14import("//build/test.gni")
15
16module_output_path = "hiview/hiview"
17
18group("unittest") {
19  testonly = true
20  deps = [ ":HiviewSATest" ]
21}
22
23config("unittest_config") {
24  include_dirs = [
25    "//utils/native/base/include",
26    "unittest/common",
27    "$hiview_service",
28  ]
29
30  cflags_cc = [ "-D__UNITTEST__" ]
31}
32
33ohos_unittest("HiviewSATest") {
34  module_out_path = module_output_path
35  configs = [ ":unittest_config" ]
36
37  sources = [ "unittest/common/hiview_sa_test.cpp" ]
38
39  cflags_cc = [ "-DTEST_LOCAL_SRC" ]
40
41  deps = [
42    "$hiview_adapter/service/zidl:hiview_service_ability",
43    "$hiview_base:hiview_base",
44    "$hiview_service:hiview_service",
45    "//third_party/googletest:gtest_main",
46  ]
47
48  if (is_standard_system) {
49    external_deps = [
50      "communication_L2:ipc_core",
51      "safwk:system_ability_fwk",
52      "samgr_standard:samgr_proxy",
53    ]
54  } else {
55    external_deps = [
56      "ipc:ipc_core",
57      "safwk:system_ability_fwk",
58      "samgr:samgr_proxy",
59    ]
60  }
61}
62