• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
2# This file contains confidential and proprietary information of
3# OSWare Technology Co., Ltd
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import("//build/test.gni")
18
19module_output_path = "hdf/platform"
20ohos_unittest("hdf_adapter_uhdf_test_platform") {
21  module_out_path = module_output_path
22  include_dirs = [
23    "//drivers/framework/include/platform",
24    "//drivers/framework/include/core",
25    "//drivers/framework/include/osal",
26    "//drivers/adapter/uhdf/posix/include",
27    "//drivers/framework/include/utils",
28    "//drivers/framework/include",
29    "//drivers/framework/test/unittest/include",
30    "//drivers/framework/test/unittest/platform/common",
31    "//drivers/framework/core/host/include",
32    "//drivers/framework/core/manager/include",
33    "//drivers/adapter/uhdf2/include/host",
34    "//drivers/framework/support/platform/include",
35    "//drivers/framework/support/platform/include/fwk",
36    "//drivers/framework/model/storage/include/mmc",
37    "//drivers/framework/support/platform/include/spi",
38    "//drivers/framework/support/platform/include/watchdog",
39    "//drivers/framework/support/platform/include/i2c",
40    "//drivers/framework/support/platform/include/uart",
41    "//drivers/framework/support/platform/include/rtc",
42  ]
43
44  sources = [
45    "common/hdf_emmc_test.cpp",
46    "common/hdf_gpio_test.cpp",
47    "common/hdf_i2c_test.cpp",
48    "common/hdf_mipi_dsi_test.cpp",
49    "common/hdf_pwm_test.cpp",
50    "common/hdf_rtc_test.cpp",
51    "common/hdf_sdio_test.cpp",
52    "common/hdf_spi_test.cpp",
53    "common/hdf_uart_test.cpp",
54    "common/hdf_watchdog_test.cpp",
55  ]
56
57  defines = [ "__USER__" ]
58  deps = [
59    "//drivers/hdf_core/adapter/build/test_common:libhdf_test_common",
60    "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils",
61  ]
62  resource_config_file =
63      "//drivers/hdf_core/adapter/uhdf2/test/resource/platform/ohos_test.xml"
64  cflags = [
65    "-Wall",
66    "-Wextra",
67    "-Werror",
68    "-fsigned-char",
69    "-fno-common",
70    "-fno-strict-aliasing",
71  ]
72  if (is_standard_system) {
73    external_deps = [
74      "c_utils:utils",
75      "hilog:libhilog",
76    ]
77  } else {
78    external_deps = [ "hilog:libhilog" ]
79  }
80}
81