# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") module_output_path = "hdf_core/manager" ohos_unittest("hdf_adapter_uhdf_test_manager") { module_out_path = module_output_path include_dirs = [ "//drivers/hdf_core/framework/include/platform", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/core/common/include/host", "//drivers/hdf_core/framework/core/shared/include", "//drivers/hdf_core/framework/include/osal", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include", "//drivers/hdf_core/framework/test/unittest/include", "//drivers/hdf_core/framework/test/unittest/manager", ] defines = [ "__USER__" ] sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_lite_manager_test.cpp" ] deps = [ "//drivers/hdf_core/adapter/build/test_common:libhdf_test_common", "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils", ] resource_config_file = "//drivers/hdf_core/adapter/uhdf2/test/resource/manager/ohos_test.xml" if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/ioservice" ohos_unittest("hdf_adapter_uhdf_test_ioservice") { module_out_path = module_output_path include_dirs = [ "//drivers/hdf_core/framework/include/platform", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/core/common/include/host", "//drivers/hdf_core/framework/core/shared/include", "//drivers/hdf_core/framework/include/osal", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include", "//drivers/hdf_core/framework/test/unittest/include", "//drivers/hdf_core/framework/test/unittest/manager", ] defines = [ "__USER__" ] sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_ioservice_test.cpp" ] deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/sbuf" ohos_unittest("hdf_adapter_uhdf_test_sbuf") { module_out_path = module_output_path include_dirs = [ "//drivers/hdf_core/framework/include/osal", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include", "//drivers/hdf_core/framework/test/unittest/include", "//drivers/hdf_core/framework/test/unittest/manager", ] defines = [ "__USER__" ] sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_sbuf_test.cpp" ] deps = [ "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", "$hdf_uhdf_path/utils:libhdf_utils", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/pm" ohos_unittest("hdf_adapter_uhdf_test_pm") { module_out_path = module_output_path include_dirs = [ "//drivers/hdf_core/framework/core/shared/include", "//drivers/hdf_core/framework/test/unittest/include", "//drivers/hdf_core/framework/test/unittest/pm", ] defines = [ "__USER__" ] sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_pm_test.cpp" ] deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/uevent" ohos_unittest("hdf_adapter_uhdf_test_uevent") { module_out_path = module_output_path include_dirs = [ "//drivers/hdf_core/framework/core/shared/include" ] defines = [ "__USER__" ] sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/devmgr_uevent_test.cpp" ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } }