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_core/osal" 17ohos_unittest("hdf_adapter_uhdf_test_osal") { 18 module_out_path = module_output_path 19 20 include_dirs = [ 21 "//drivers/hdf_core/framework/include/platform", 22 "//drivers/hdf_core/framework/include/core", 23 "//drivers/hdf_core/framework/include/osal", 24 "//drivers/hdf_core/adapter/uhdf/posix/include", 25 "//drivers/hdf_core/framework/include/utils", 26 "//drivers/hdf_core/framework/include", 27 "//drivers/hdf_core/framework/test/unittest/include", 28 "//drivers/hdf_core/framework/test/unittest/osal", 29 ] 30 31 defines = [ "__USER__" ] 32 sources = [ "//drivers/hdf_core/framework/support/posix/test/unittest/common/hdf_osal_test.cpp" ] 33 deps = [ 34 "//drivers/hdf_core/adapter/build/test_common:libhdf_test_common", 35 "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils", 36 ] 37 resource_config_file = 38 "//drivers/hdf_core/adapter/uhdf2/test/resource/osal/ohos_test.xml" 39 if (is_standard_system) { 40 external_deps = [ 41 "c_utils:utils", 42 "hiviewdfx_hilog_native:libhilog", 43 ] 44 } else { 45 external_deps = [ "hilog:libhilog" ] 46 } 47} 48 49ohos_unittest("hdf_adapter_uhdf_test_osal_posix") { 50 module_out_path = module_output_path 51 52 include_dirs = [ 53 "//drivers/hdf_core/framework/include/platform", 54 "//drivers/hdf_core/framework/include/core", 55 "//drivers/hdf_core/framework/include/osal", 56 "//drivers/hdf_core/adapter/uhdf/posix/include", 57 "//drivers/hdf_core/framework/include/utils", 58 "//drivers/hdf_core/framework/include", 59 "//drivers/hdf_core/framework/test/unittest/include", 60 "//drivers/hdf_core/framework/test/unittest/osal", 61 ] 62 63 defines = [ "__USER__" ] 64 sources = [ 65 "//drivers/hdf_core/framework/support/posix/test/unittest/common/hdf_osal_test_posix.cpp", 66 "//drivers/hdf_core/framework/test/unittest/osal/osal_all_test.c", 67 "//drivers/hdf_core/framework/test/unittest/osal/osal_get_case_test.c", 68 "//drivers/hdf_core/framework/test/unittest/osal/osal_list_test.c", 69 ] 70 deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ] 71 72 if (is_standard_system) { 73 external_deps = [ 74 "c_utils:utils", 75 "hiviewdfx_hilog_native:libhilog", 76 ] 77 } else { 78 external_deps = [ "hilog:libhilog" ] 79 } 80} 81