1# Copyright (c) 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") 15 16module_output_path = "ai_intelligent_voice_framework/intell_voice" 17 18ohos_unittest("client_unit_test") { 19 testonly = true 20 module_out_path = module_output_path 21 sources = [ 22 "src/client_unit_test.cpp", 23 "src/engine_event_callback.cpp", 24 "src/wait_for_result.cpp", 25 ] 26 27 include_dirs = [ 28 "include", 29 "../../../services/intell_voice_engine", 30 "../../../services/intell_voice_engine/server/base", 31 "../../../services/intell_voice_engine/proxy", 32 "../../../utils", 33 ] 34 35 cflags_cc = [ 36 "-Wno-error=unused-parameter", 37 "-DHILOG_ENABLE", 38 "-DENABLE_DEBUG", 39 ] 40 41 deps = [ "../../../services:intell_voice_proxy" ] 42 43 external_deps = [ 44 "c_utils:utils", 45 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers", 46 "hilog:libhilog", 47 "ipc:ipc_core", 48 "safwk:system_ability_fwk", 49 "samgr:samgr_proxy", 50 ] 51 52 resource_config_file = "resource/ohos_test.xml" 53} 54 55ohos_unittest("trigger_unit_test") { 56 testonly = true 57 module_out_path = module_output_path 58 sources = [ "src/trigger_unit_test.cpp" ] 59 60 include_dirs = [ 61 "../../../services/intell_voice_trigger/server", 62 "../../../services/intell_voice_trigger/server/connector_mgr", 63 "../../../utils", 64 ] 65 66 cflags_cc = [ 67 "-Wno-error=unused-parameter", 68 "-DHILOG_ENABLE", 69 "-DENABLE_DEBUG", 70 ] 71 72 deps = [ "../../../services:intell_voice_server" ] 73 74 external_deps = [ 75 "c_utils:utils", 76 "drivers_interface_intelligent_voice:intell_voice_trigger_idl_headers", 77 "hilog:libhilog", 78 "relational_store:native_rdb", 79 ] 80} 81 82ohos_unittest("trigger_manager_test") { 83 testonly = true 84 module_out_path = module_output_path 85 sources = [ "src/trigger_manager_test.cpp" ] 86 87 include_dirs = [ 88 "../../../services/intell_voice_trigger/server", 89 "../../../services/intell_voice_trigger/server/connector_mgr", 90 "../../../utils", 91 ] 92 93 cflags_cc = [ 94 "-Wno-error=unused-parameter", 95 "-DHILOG_ENABLE", 96 "-DENABLE_DEBUG", 97 ] 98 99 deps = [ "../../../services:intell_voice_server" ] 100 101 external_deps = [ 102 "c_utils:utils", 103 "drivers_interface_intelligent_voice:intell_voice_trigger_idl_headers", 104 "hilog:libhilog", 105 "relational_store:native_rdb", 106 "safwk:system_ability_fwk", 107 "samgr:samgr_proxy", 108 ] 109} 110