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/manager" 17ohos_unittest("hdf_adapter_uhdf_test_manager") { 18 module_out_path = module_output_path 19 include_dirs = [ 20 "//drivers/framework/include/platform", 21 "//drivers/framework/include/core", 22 "//drivers/framework/core/common/include/host", 23 "//drivers/framework/core/shared/include", 24 "//drivers/framework/include/osal", 25 "//drivers/framework/include/utils", 26 "//drivers/framework/include", 27 "//drivers/framework/test/unittest/include", 28 "//drivers/framework/test/unittest/manager", 29 ] 30 31 defines = [ "__USER__" ] 32 sources = [ "//drivers/framework/core/manager/test/unittest/common/hdf_lite_manager_test.cpp" ] 33 deps = [ 34 "//drivers/adapter/build/test_common:libhdf_test_common", 35 "//drivers/adapter/uhdf2/utils:libhdf_utils", 36 ] 37 cflags = [ 38 "-Wall", 39 "-Wextra", 40 "-Werror", 41 "-fsigned-char", 42 "-fno-common", 43 "-fno-strict-aliasing", 44 ] 45 if (is_standard_system) { 46 external_deps = [ 47 "hiviewdfx_hilog_native:libhilog", 48 "utils_base:utils", 49 ] 50 } else { 51 external_deps = [ "hilog:libhilog" ] 52 } 53} 54 55module_output_path = "hdf/ioservice" 56ohos_unittest("hdf_adapter_uhdf_test_ioservice") { 57 module_out_path = module_output_path 58 include_dirs = [ 59 "//drivers/framework/include/platform", 60 "//drivers/framework/include/core", 61 "//drivers/framework/core/common/include/host", 62 "//drivers/framework/core/shared/include", 63 "//drivers/framework/include/osal", 64 "//drivers/framework/include/utils", 65 "//drivers/framework/include", 66 "//drivers/framework/test/unittest/include", 67 "//drivers/framework/test/unittest/manager", 68 ] 69 70 defines = [ "__USER__" ] 71 sources = [ "//drivers/framework/core/manager/test/unittest/common/hdf_ioservice_test.cpp" ] 72 deps = [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ] 73 cflags = [ 74 "-Wall", 75 "-Wextra", 76 "-Werror", 77 "-fsigned-char", 78 "-fno-common", 79 "-fno-strict-aliasing", 80 ] 81 if (is_standard_system) { 82 external_deps = [ 83 "hiviewdfx_hilog_native:libhilog", 84 "utils_base:utils", 85 ] 86 } else { 87 external_deps = [ "hilog:libhilog" ] 88 } 89} 90module_output_path = "hdf/sbuf" 91ohos_unittest("hdf_adapter_uhdf_test_sbuf") { 92 module_out_path = module_output_path 93 include_dirs = [ 94 "//drivers/framework/include/osal", 95 "//drivers/framework/include/utils", 96 "//drivers/framework/include", 97 "//drivers/framework/test/unittest/include", 98 "//drivers/framework/test/unittest/manager", 99 ] 100 101 defines = [ "__USER__" ] 102 sources = [ 103 "//drivers/framework/core/manager/test/unittest/common/hdf_sbuf_test.cpp", 104 ] 105 deps = [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ] 106 resource_config_file = 107 "//drivers/adapter/uhdf2/test/resource/manager/ohos_test.xml" 108 cflags = [ 109 "-Wall", 110 "-Wextra", 111 "-Werror", 112 "-fsigned-char", 113 "-fno-common", 114 "-fno-strict-aliasing", 115 ] 116 if (is_standard_system) { 117 external_deps = [ 118 "hiviewdfx_hilog_native:libhilog", 119 "utils_base:utils", 120 ] 121 } else { 122 external_deps = [ "hilog:libhilog" ] 123 } 124} 125module_output_path = "hdf/pm" 126ohos_unittest("hdf_adapter_uhdf_test_pm") { 127 module_out_path = module_output_path 128 include_dirs = [ 129 "//drivers/framework/core/shared/include", 130 "//drivers/framework/test/unittest/include", 131 "//drivers/framework/test/unittest/pm", 132 ] 133 134 defines = [ "__USER__" ] 135 sources = [ 136 "//drivers/framework/core/manager/test/unittest/common/hdf_pm_test.cpp", 137 ] 138 deps = [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ] 139 cflags = [ 140 "-Wall", 141 "-Wextra", 142 "-Werror", 143 "-fsigned-char", 144 "-fno-common", 145 "-fno-strict-aliasing", 146 ] 147 if (is_standard_system) { 148 external_deps = [ 149 "hiviewdfx_hilog_native:libhilog", 150 "utils_base:utils", 151 ] 152 } else { 153 external_deps = [ "hilog:libhilog" ] 154 } 155} 156