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 14import("//build/test.gni") 15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17module_output_path = "hdf_core/srvmgr" 18 19###########################palTest########################### 20 21ohos_unittest("HdiServiceManagerTest") { 22 module_out_path = module_output_path 23 sources = [ "servmgr/service_manager_hdi_c_test.cpp" ] 24 25 deps = [ 26 "$hdf_uhdf_path/hdi:libhdi", 27 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 28 "$hdf_uhdf_path/utils:libhdf_utils", 29 ] 30 31 include_dirs = [ 32 "$hdf_uhdf_path/host/test/unittest/sample_driver", 33 "$hdf_uhdf_path/utils/include", 34 "$hdf_framework_path/core/shared/include", 35 ] 36 37 if (with_sample) { 38 defines = [ "SAMPLE_DRIVER" ] 39 } 40 41 external_deps = [ 42 "c_utils:utils", 43 "googletest:gmock_main", 44 "googletest:gtest_main", 45 "hilog:libhilog", 46 "ipc:ipc_single", 47 ] 48} 49 50ohos_unittest("HdiServiceManagerTestCC") { 51 module_out_path = module_output_path 52 include_dirs = [ 53 "$hdf_framework_path/core/shared/include", 54 "$hdf_uhdf_path/host/test/unittest/sample_driver", 55 ] 56 sources = [ "servmgr/service_manager_hdi_test.cpp" ] 57 58 if (with_sample) { 59 defines = [ "SAMPLE_DRIVER" ] 60 } 61 62 deps = [ 63 "$hdf_uhdf_path/hdi:libhdi", 64 "$hdf_uhdf_path/utils:libhdf_utils", 65 ] 66 67 external_deps = [ 68 "c_utils:utils", 69 "googletest:gmock_main", 70 "googletest:gtest_main", 71 "hilog:libhilog", 72 "ipc:ipc_single", 73 "samgr:samgr_proxy", 74 ] 75} 76 77###########################end########################### 78group("unittest") { 79 testonly = true 80 deps = [ 81 ":HdiServiceManagerTest", 82 ":HdiServiceManagerTestCC", 83 "./../../../../adapter/uhdf2/hdi/test/buffer_handle:hdi_buffer_handle_test", 84 "object_collector:object_collector_test", 85 "smq_test:HdiSmqTest", 86 "stub_collector:stub_collector_test", 87 ] 88} 89