1# Copyright (c) 2025 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("//arkcompiler/ets_runtime/common_components/tests/test_helper.gni") 15 16module_output_path = "common_component" 17 18host_unittest_action("Runner_Test") { 19 module_out_path = module_output_path 20 21 sources = [ 22 # test file 23 "runner_test.cpp", 24 ] 25 26 configs = [ 27 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 28 "//arkcompiler/ets_runtime:icu_path_test_config", 29 ] 30 31 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 32 33 # hiviewdfx libraries 34 external_deps = [ 35 "icu:shared_icui18n", 36 "icu:shared_icuuc", 37 "zlib:libz", 38 ] 39} 40 41host_unittest_action("Taskpool_Task_Queue_Test") { 42 module_out_path = module_output_path 43 44 sources = [ 45 # test file 46 "task_queue_test.cpp", 47 ] 48 49 configs = [ 50 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 51 "//arkcompiler/ets_runtime:icu_path_test_config", 52 ] 53 54 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 55 56 # hiviewdfx libraries 57 external_deps = [ 58 "icu:shared_icui18n", 59 "icu:shared_icuuc", 60 "zlib:libz", 61 ] 62} 63 64host_unittest_action("Taskpool_Test") { 65 module_out_path = module_output_path 66 67 sources = [ 68 # test file 69 "taskpool_test.cpp", 70 ] 71 72 configs = [ 73 "//arkcompiler/ets_runtime/common_components:common_components_test_config", 74 "//arkcompiler/ets_runtime:icu_path_test_config", 75 ] 76 77 deps = [ "//arkcompiler/ets_runtime/common_components:libark_common_components_test" ] 78 79 # hiviewdfx libraries 80 external_deps = [ 81 "icu:shared_icui18n", 82 "icu:shared_icuuc", 83 "zlib:libz", 84 ] 85} 86 87group("unittest") { 88 testonly = true 89 90 # deps file 91 deps = [ 92 ":Runner_Test", 93 ":Taskpool_Task_Queue_Test", 94 ":Taskpool_Test", 95 ] 96} 97 98group("host_unittest") { 99 testonly = true 100 101 # deps file 102 deps = [ 103 ":Runner_TestAction", 104 ":Taskpool_Task_Queue_TestAction", 105 ":Taskpool_TestAction", 106 ] 107}