# Copyright (c) 2021-2023 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("./../../../uhdf.gni") hdf_framework_path = "./../../../../../framework" hdf_adapter_path = "./../../../../../adapter" module_output_path = "hdf_core/manager" ohos_unittest("hdf_adapter_uhdf_test_manager") { module_out_path = module_output_path include_dirs = [ "$hdf_framework_path/include/platform", "$hdf_framework_path/include/core", "$hdf_framework_path/core/common/include/host", "$hdf_framework_path/core/shared/include", "$hdf_framework_path/include/osal", "$hdf_framework_path/include/utils", "$hdf_framework_path/include", "$hdf_framework_path/test/unittest/include", "$hdf_framework_path/test/unittest/manager", ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/core/manager/test/unittest/common/hdf_lite_manager_test.cpp" ] deps = [ "$hdf_adapter_path/build/test_common:libhdf_test_common", "$hdf_adapter_path/uhdf2/utils:libhdf_utils", ] resource_config_file = "$hdf_adapter_path/uhdf2/test/resource/manager/ohos_test.xml" if (is_standard_system) { external_deps = [ "c_utils:utils", "hilog: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 = [ "$hdf_framework_path/include/platform", "$hdf_framework_path/include/core", "$hdf_framework_path/core/common/include/host", "$hdf_framework_path/core/shared/include", "$hdf_framework_path/include/osal", "$hdf_framework_path/include/utils", "$hdf_framework_path/include", "$hdf_framework_path/test/unittest/include", "$hdf_framework_path/test/unittest/manager", ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/core/manager/test/unittest/common/hdf_ioservice_test.cpp" ] deps = [ "$hdf_adapter_path/uhdf2/utils:libhdf_utils" ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hilog: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 = [ "$hdf_framework_path/include/osal", "$hdf_framework_path/include/utils", "$hdf_framework_path/include", "$hdf_framework_path/test/unittest/include", "$hdf_framework_path/test/unittest/manager", "$hdf_adapter_path/uhdf2/ipc/include", ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/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", "hilog:libhilog", "ipc:ipc_single", ] } 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 = [ "$hdf_framework_path/core/shared/include", "$hdf_framework_path/test/unittest/include", "$hdf_framework_path/test/unittest/pm", ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/core/manager/test/unittest/common/hdf_pm_test.cpp", ] deps = [ "$hdf_adapter_path/uhdf2/utils:libhdf_utils" ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/remote" ohos_unittest("hdf_adapter_uhdf_test_remote_adapter") { module_out_path = module_output_path include_dirs = [ "$hdf_framework_path/test/unittest/include", "$hdf_framework_path/test/unittest/manager", "$hdf_adapter_path/uhdf2/ipc/include", ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/core/manager/test/unittest/common/hdf_remote_adapter_test.cpp" ] deps = [ "$hdf_uhdf_path/hdi:libhdi", "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", "$hdf_uhdf_path/utils:libhdf_utils", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hilog:libhilog", "ipc:ipc_single", ] } else { external_deps = [ "hilog:libhilog" ] } } module_output_path = "hdf_core/shared" ohos_unittest("hdf_adapter_uhdf_test_core_shared") { module_out_path = module_output_path include_dirs = [ "$hdf_framework_path/core/shared/include" ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/core/shared/test/unittest/common/hdf_core_shared_test.cpp" ] deps = [ "$hdf_uhdf_path/hdi:libhdi", "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", "$hdf_uhdf_path/utils:libhdf_utils", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hdf_core:libhdf_host", "hilog:libhilog", "ipc:ipc_single", ] } 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 = [ "$hdf_framework_path/core/shared/include" ] defines = [ "__USER__" ] sources = [ "$hdf_framework_path/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", "hilog:libhilog", ] } else { external_deps = [ "hilog:libhilog" ] } }