1# Copyright (c) 2021 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/js_runtime_config.gni") 15import("//arkcompiler/ets_runtime/test/test_helper.gni") 16 17module_output_path = "arkcompiler/ets_runtime" 18 19host_unittest_action("EcmaVm_001_Test") { 20 module_out_path = module_output_path 21 22 sources = [ 23 # test file 24 "accessor_data_test.cpp", 25 "assert_scope_test.cpp", 26 "builtins_test.cpp", 27 "byte_array_test.cpp", 28 "concurrent_marking_test.cpp", 29 "concurrent_sweep_test.cpp", 30 "dump_test.cpp", 31 32 # "ecma_string_test.cpp", 33 "constant_string_test.cpp", 34 "ecma_context_test.cpp", 35 "ecma_string_accessor_test.cpp", 36 "ecma_string_table_test.cpp", 37 "ecma_vm_test.cpp", 38 "frame_test.cpp", 39 "gc_test.cpp", 40 "global_dictionary_test.cpp", 41 "glue_regs_test.cpp", 42 "handle_leak_test.cpp", 43 "huge_object_test.cpp", 44 "incremental_marking_test.cpp", 45 "js_api_arraylist_iterator_test.cpp", 46 "js_api_arraylist_test.cpp", 47 "js_api_deque_iterator_test.cpp", 48 "js_api_deque_test.cpp", 49 "js_api_hashmap_iterator_test.cpp", 50 "js_api_hashmap_test.cpp", 51 "js_api_hashset_iterator_test.cpp", 52 "js_api_hashset_test.cpp", 53 "js_api_lightweightmap_iterator_test.cpp", 54 "js_api_lightweightmap_test.cpp", 55 "js_api_lightweightset_iterator_test.cpp", 56 "js_api_lightweightset_test.cpp", 57 "js_api_linked_list_iterator_test.cpp", 58 "js_api_linked_list_test.cpp", 59 "js_api_list_iterator_test.cpp", 60 "js_api_list_test.cpp", 61 "js_api_plain_array_iterator_test.cpp", 62 "js_api_plain_array_test.cpp", 63 "js_api_queue_iterator_test.cpp", 64 "js_api_queue_test.cpp", 65 "js_api_stack_iterator_test.cpp", 66 "js_api_stack_test.cpp", 67 "js_api_tree_map_iterator_test.cpp", 68 "js_api_tree_map_test.cpp", 69 "js_api_tree_set_iterator_test.cpp", 70 "js_api_tree_set_test.cpp", 71 "js_api_vector_iterator_test.cpp", 72 "js_api_vector_test.cpp", 73 "js_arguments_test.cpp", 74 "js_array_buffer_test.cpp", 75 "js_array_iterator_test.cpp", 76 "js_array_test.cpp", 77 "js_async_function_test.cpp", 78 "js_bigint_test.cpp", 79 "throw_oom_error_test.cpp", 80 ] 81 82 configs = [ 83 "//arkcompiler/ets_runtime:asm_interp_enable_config", 84 "//arkcompiler/ets_runtime:ecma_test_config", 85 "$ark_root/assembler:arkassembler_public_config", 86 "$ark_root/libpandafile:arkfile_public_config", 87 ] 88 89 deps = [ 90 "$ark_third_party_root/icu/icu4c:shared_icui18n", 91 "$ark_third_party_root/icu/icu4c:shared_icuuc", 92 "//arkcompiler/ets_runtime:libark_jsruntime_test", 93 sdk_libc_secshared_dep, 94 ] 95 96 # hiviewdfx libraries 97 external_deps = hiviewdfx_ext_deps 98 deps += hiviewdfx_deps 99} 100 101host_unittest_action("EcmaVm_002_Test") { 102 module_out_path = module_output_path 103 104 sources = [ 105 # test file 106 "js_async_generator_object_test.cpp", 107 "js_collator_test.cpp", 108 "js_dataview_test.cpp", 109 "js_date_test.cpp", 110 "js_date_time_format_test.cpp", 111 "js_displaynames_test.cpp", 112 "js_finalization_registry_test.cpp", 113 "js_forin_iterator_test.cpp", 114 "js_function_test.cpp", 115 "js_generator_object_test.cpp", 116 "js_handle_test.cpp", 117 "js_hclass_test.cpp", 118 "js_iterator_test.cpp", 119 "js_list_format_test.cpp", 120 "js_locale_test.cpp", 121 "js_map_iterator_test.cpp", 122 "js_map_test.cpp", 123 "js_number_format_test.cpp", 124 "js_object_test.cpp", 125 "js_plural_rules_test.cpp", 126 "js_primitive_ref_test.cpp", 127 "js_promise_test.cpp", 128 "js_proxy_test.cpp", 129 "js_regexp_iterator_test.cpp", 130 "js_relative_time_format_test.cpp", 131 "locale_helper_test.cpp", 132 ] 133 134 configs = [ 135 "//arkcompiler/ets_runtime:ecma_test_config", 136 "//arkcompiler/ets_runtime:icu_path_test_config", 137 ] 138 139 deps = [ 140 "$ark_third_party_root/icu/icu4c:shared_icui18n", 141 "$ark_third_party_root/icu/icu4c:shared_icuuc", 142 "//arkcompiler/ets_runtime:libark_jsruntime_test", 143 sdk_libc_secshared_dep, 144 ] 145 146 # hiviewdfx libraries 147 external_deps = hiviewdfx_ext_deps 148 deps += hiviewdfx_deps 149} 150 151host_unittest_action("EcmaVm_003_Test") { 152 module_out_path = module_output_path 153 154 sources = [ 155 # test file 156 "js_serializer_test.cpp", 157 "js_set_iterator_test.cpp", 158 "js_set_test.cpp", 159 "js_stable_array_test.cpp", 160 "js_symbol_test.cpp", 161 "js_tagged_number_test.cpp", 162 "js_tagged_queue_test.cpp", 163 "js_typed_array_test.cpp", 164 "js_verification_test.cpp", 165 "layout_info_test.cpp", 166 "lexical_env_test.cpp", 167 "linked_hash_table_test.cpp", 168 "linked_node_test.cpp", 169 "mem_controller_test.cpp", 170 "mem_map_allocator_test.cpp", 171 "native_pointer_test.cpp", 172 "object_factory_test.cpp", 173 "object_operator_test.cpp", 174 "rb_tree_node_test.cpp", 175 "read_only_space_test.cpp", 176 "symbol_table_test.cpp", 177 "tagged_array_test.cpp", 178 "tagged_dictionary_test.cpp", 179 "tagged_hash_array_test.cpp", 180 "tagged_tree_test.cpp", 181 "tagged_value_test.cpp", 182 "template_map_test.cpp", 183 "template_string_test.cpp", 184 "transitions_dictionary_test.cpp", 185 "waiter_list_test.cpp", 186 "weak_ref_old_gc_test.cpp", 187 "weak_ref_semi_gc_test.cpp", 188 189 # "weak_vector_test.cpp", 190 ] 191 192 configs = [ 193 "//arkcompiler/ets_runtime:ecma_test_config", 194 "$ark_root/assembler:arkassembler_public_config", 195 "$ark_root/libpandafile:arkfile_public_config", 196 ] 197 198 deps = [ 199 "$ark_third_party_root/icu/icu4c:shared_icui18n", 200 "$ark_third_party_root/icu/icu4c:shared_icuuc", 201 "//arkcompiler/ets_runtime:libark_jsruntime_test", 202 "//arkcompiler/runtime_core/assembler:libarkassembler_static", 203 sdk_libc_secshared_dep, 204 ] 205 206 # hiviewdfx libraries 207 external_deps = hiviewdfx_ext_deps 208 deps += hiviewdfx_deps 209} 210 211group("unittest") { 212 testonly = true 213 214 # deps file 215 deps = [ 216 ":EcmaVm_001_Test", 217 ":EcmaVm_002_Test", 218 ":EcmaVm_003_Test", 219 ] 220} 221 222group("host_unittest") { 223 testonly = true 224 225 # deps file 226 deps = [ 227 ":EcmaVm_001_TestAction", 228 ":EcmaVm_002_TestAction", 229 ":EcmaVm_003_TestAction", 230 ] 231} 232