• 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
16config("module_private_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    "include",
20    "//commonlibrary/c_utils/base/include",
21    "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include",
22  ]
23}
24
25if (defined(ohos_lite)) {
26  import("//build/lite/config/component/lite_component.gni")
27  import("//build/lite/config/test.gni")
28
29  if (ohos_build_type == "debug") {
30    unittest("FaultloggerdModuleTest") {
31      output_extension = "bin"
32      output_dir = "$root_out_dir/test/unittest/faultloggerd"
33      configs = [ ":module_private_config" ]
34      sources = [ "faultloggerd_module_test.cpp" ]
35      deps = [
36        "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd",
37        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
38      ]
39    }
40  }
41
42  group("moduletest") {
43    deps = [ ":FaultloggerdModuleTest" ]
44  }
45} else {
46  import("//build/config/features.gni")
47  import("//build/test.gni")
48
49  module_output_path = "faultloggerd/faultloggerd_native"
50
51  ohos_moduletest("FaultloggerdModuleTest") {
52    module_out_path = module_output_path
53    sources = [ "faultloggerd_module_test.cpp" ]
54    configs = [ ":module_private_config" ]
55    deps = [
56      "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd",
57      "//third_party/googletest:gtest_main",
58    ]
59    external_deps = [ "c_utils:utils" ]
60  }
61
62  group("moduletest") {
63    testonly = true
64    deps = [ ":FaultloggerdModuleTest" ]
65  }
66}
67