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