1# Copyright (c) 2021-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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/test.gni") 16} else { 17 import("//build/config/sanitizers/sanitizers.gni") 18 import("//build/test.gni") 19 import("./../../../../hdf_core/adapter/uhdf2/uhdf.gni") 20} 21 22if (defined(ohos_lite)) { 23 unittest("hdf_usb_device_sdk_io_test") { 24 output_extension = "bin" 25 output_dir = "$root_out_dir/test/unittest/hdf" 26 include_dirs = [ 27 "//third_party/googletest/googletest/include", 28 "//third_party/bounds_checking_function/include", 29 "./../../../../../base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 30 "./../unittest/common", 31 ] 32 33 sources = [ "./common/usb_device_liteos_sdk_io_test.cpp" ] 34 public_deps = [ 35 "./../../../../../base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 36 "./../../../../hdf_core/adapter/uhdf/manager:hdf_core", 37 "./../../../../hdf_core/adapter/uhdf/platform:hdf_platform", 38 "./../../../../hdf_core/adapter/uhdf/posix:hdf_posix_osal", 39 "./../../../../hdf_core/adapter/uhdf/test/unittest/common:hdf_test_common", 40 "//third_party/bounds_checking_function:libsec_shared", 41 ] 42 43 cflags = [ 44 "-Wall", 45 "-Wextra", 46 "-Werror", 47 "-fsigned-char", 48 "-fno-common", 49 "-fno-strict-aliasing", 50 ] 51 } 52} 53