• 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("//base/hiviewdfx/faultloggerd/faultloggerd.gni")
15
16if (defined(ohos_lite)) {
17  import("//build/lite/config/component/lite_component.gni")
18  import("//build/lite/config/test.gni")
19
20  if (ohos_build_type == "debug") {
21    unittest("test_dumpcatcher") {
22      output_extension = "bin"
23
24      output_dir = "$root_out_dir/test/unittest/faultloggerd"
25
26      sources = [ "dumpcatcher_interfaces_test.cpp" ]
27
28      include_dirs = [
29        "include/",
30        "//utils/native/base/include",
31        "$faultloggerd_path/common",
32        "$faultloggerd_path/interfaces/innerkits/dump_catcher/include",
33        "$faultloggerd_path/tools/process_dump",
34        "$faultloggerd_path/utils",
35        "$hilog_lite_include_path",
36      ]
37
38      deps = [
39        "$faultloggerd_path/interfaces/innerkits/dump_catcher:lib_dfx_dump_catcher",
40        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
41      ]
42    }
43  }
44
45  group("unittest") {
46    deps = [ ":test_dumpcatcher" ]
47  }
48} else {
49  import("//build/config/features.gni")
50  import("//build/test.gni")
51
52  module_output_path = "faultloggerd/dump_catcher"
53
54  ohos_unittest("test_dumpcatcher") {
55    module_out_path = module_output_path
56
57    visibility = [ "*:*" ]
58
59    include_dirs = [
60      "$faultloggerd_path/common",
61      "$faultloggerd_path/interfaces/innerkits/dump_catcher/include",
62    ]
63
64    sources = [ "dumpcatcher_interfaces_test.cpp" ]
65
66    deps = [
67      "$faultloggerd_path/interfaces/innerkits/dump_catcher:lib_dfx_dump_catcher",
68      "//third_party/googletest:gtest_main",
69    ]
70
71    external_deps = [
72      "utils_base:utils",
73      "hilog_native:libhilog",
74    ]
75  }
76
77  group("unittest") {
78    testonly = true
79    deps = [ ":test_dumpcatcher" ]
80  }
81}
82