• 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16  import("//build/lite/config/test.gni")
17} else {
18  import("//build/ohos.gni")
19  import("//build/test.gni")
20  import("//drivers/adapter/uhdf2/uhdf.gni")
21}
22
23if (defined(ohos_lite)) {
24  unittest("hdf_peripheral_misc_test_light") {
25    output_extension = "bin"
26    output_dir = "$root_out_dir/test/unittest/hdf"
27    include_dirs = [
28      "//third_party/bounds_checking_function/include",
29      "//drivers/framework/include/platform",
30      "//drivers/framework/include/core",
31      "//drivers/framework/include/osal",
32      "//drivers/framework/include/utils",
33      "//drivers/peripheral/misc/light/interfaces/include",
34      "//drivers/adapter/uhdf/posix/include",
35      "//drivers/framework/test/unittest/include",
36    ]
37
38    sources = [ "./common/hdf_light_test.cpp" ]
39    cflags = [
40      "-Wall",
41      "-Wextra",
42      "-Werror",
43      "-fsigned-char",
44      "-fno-common",
45      "-fno-strict-aliasing",
46    ]
47    deps = [
48      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
49      "//drivers/adapter/uhdf/manager:hdf_core",
50      "//drivers/adapter/uhdf/posix:hdf_posix_osal",
51      "//drivers/adapter/uhdf/test/unittest/common:hdf_test_common",
52      "//drivers/peripheral/misc/light/hal:hdi_light",
53    ]
54    public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
55  }
56} else {
57  module_output_path = "hdf/misc"
58  ohos_unittest("hdf_unittest_light") {
59    module_out_path = module_output_path
60    include_dirs = []
61
62    sources = [ "./common/hdf_light_test.cpp" ]
63    cflags = [
64      "-Wall",
65      "-Wextra",
66      "-Werror",
67      "-fsigned-char",
68      "-fno-common",
69      "-fno-strict-aliasing",
70    ]
71    deps = [ "//drivers/peripheral/misc/light/hal:hdi_light" ]
72    if (is_standard_system) {
73      external_deps = [
74        "device_driver_framework:libhdf_utils",
75        "hiviewdfx_hilog_native:libhilog",
76        "utils_base:utils",
77      ]
78    } else {
79      external_deps = [ "hilog:libhilog" ]
80    }
81  }
82}
83