• 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.
13
14import("//build/test.gni")
15
16module_output_path = "hdf/platform"
17ohos_unittest("hdf_adapter_uhdf_test_platform") {
18  module_out_path = module_output_path
19  include_dirs = [
20    "//drivers/framework/include/platform",
21    "//drivers/framework/include/core",
22    "//drivers/framework/include/osal",
23    "//drivers/adapter/uhdf/posix/include",
24    "//drivers/framework/include/utils",
25    "//drivers/framework/include",
26    "//drivers/framework/test/unittest/include",
27    "//drivers/framework/test/unittest/platform/common",
28  ]
29
30  sources = [
31    "//drivers/framework/support/platform/test/unittest/common/hdf_adc_test.cpp",
32    "//drivers/framework/support/platform/test/unittest/common/hdf_emmc_test.cpp",
33    "//drivers/framework/support/platform/test/unittest/common/hdf_gpio_test.cpp",
34    "//drivers/framework/support/platform/test/unittest/common/hdf_i2c_test.cpp",
35    "//drivers/framework/support/platform/test/unittest/common/hdf_pwm_test.cpp",
36    "//drivers/framework/support/platform/test/unittest/common/hdf_rtc_test.cpp",
37    "//drivers/framework/support/platform/test/unittest/common/hdf_spi_test.cpp",
38    "//drivers/framework/support/platform/test/unittest/common/hdf_timer_test.cpp",
39    "//drivers/framework/support/platform/test/unittest/common/hdf_uart_test.cpp",
40    "//drivers/framework/support/platform/test/unittest/common/hdf_watchdog_test.cpp",
41    "//drivers/framework/test/unittest/platform/common/adc_test.c",
42    "//drivers/framework/test/unittest/platform/common/gpio_test.c",
43    "//drivers/framework/test/unittest/platform/common/i2c_test.c",
44    "//drivers/framework/test/unittest/platform/common/rtc_test.c",
45    "//drivers/framework/test/unittest/platform/common/spi_test.c",
46    "//drivers/framework/test/unittest/platform/common/timer_test.c",
47    "//drivers/framework/test/unittest/platform/common/uart_test.c",
48  ]
49
50  deps = [
51    "//drivers/adapter/build/test_common:libhdf_test_common",
52    "//drivers/adapter/uhdf2/utils:libhdf_utils",
53  ]
54  resource_config_file =
55      "//drivers/adapter/uhdf2/test/resource/platform/ohos_test.xml"
56  cflags = [
57    "-Wall",
58    "-Wextra",
59    "-Werror",
60    "-fsigned-char",
61    "-fno-common",
62    "-fno-strict-aliasing",
63  ]
64  if (is_standard_system) {
65    external_deps = [
66      "hiviewdfx_hilog_native:libhilog",
67      "utils_base:utils",
68    ]
69  } else {
70    external_deps = [ "hilog:libhilog" ]
71  }
72}
73