• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-2023 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/lite/config/subsystem/aafwk/path.gni")
15import("//build/lite/config/test.gni")
16
17declare_args() {
18  hilog_lite_disable_test = false
19}
20
21group("hilog_lite_test") {
22  if (ohos_build_type == "debug" && ohos_kernel_type != "liteos_m" &&
23      !hilog_lite_disable_test) {
24    deps = [ ":lite_hilog_unittest" ]
25  }
26}
27
28if (ohos_build_type == "debug" && ohos_kernel_type != "liteos_m" &&
29    !hilog_lite_disable_test) {
30  unittest("lite_hilog_unittest") {
31    output_extension = "bin"
32    output_dir = "$root_out_dir/test/unittest/hilog_lite"
33    sources = [ "unittest/hilog_lite_test.cpp" ]
34    include_dirs = [
35      "include",
36      "//third_party/bounds_checking_function/include",
37      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin",
38      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base",
39      "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/async",
40      "${aafwk_lite_path}/interfaces/kits/ability_lite",
41      "//base/powermgr/battery_lite/interfaces/kits",
42      "//base/powermgr/battery_lite/frameworks/native/include",
43      "//base/hiviewdfx/hilog_lite/frameworks/js/builtin/include",
44    ]
45    deps = [
46      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
47      "//base/hiviewdfx/hilog_lite/frameworks/js/builtin:ace_kit_hilog",
48      "//base/powermgr/battery_lite/frameworks:batterymgr",
49      "//foundation/arkui/ace_engine_lite/frameworks/native_engine:ace_native_engine",
50      "//third_party/bounds_checking_function:libsec_shared",
51      "//third_party/jerryscript/jerry-port/default:jerry-port-default_shared",
52    ]
53    if (ohos_kernel_type == "liteos_m") {
54      deps += [
55        "//foundation/arkui/ui_lite:ui",
56        "//third_party/jerryscript:jerry_engine",
57      ]
58    } else {
59      deps += [ "//third_party/jerryscript/jerry-core:jerry-core_shared" ]
60    }
61  }
62}
63