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 14group("ark_aot_js_test") { 15 testonly = true 16 test_list = [ 17 "asyncfunctionenter", 18 "bigint_typed_array_constructors", 19 "call_default_args", 20 "constructor_returns_non_object", 21 "tryldglobalbyname", 22 "dynamicimport", 23 "formatrangetoparts", 24 "module", 25 "undefined", 26 "cjs", 27 "for_await_of", 28 "dead_code_elimination", 29 "equal", 30 "js_string_equal", 31 "js_string_add", 32 "regressioncase", 33 "definefieldbyname", 34 "definefieldbyname2", 35 "induction_variable", 36 "lower_jscode_0001", 37 "lower_jscode_0002", 38 ] 39 40 deps = [] 41 foreach(test, test_list) { 42 deps += [ "${test}:${test}AotAction" ] 43 if (!is_debug) { 44 deps += [ "${test}:${test}AotContextAction" ] 45 } 46 } 47} 48 49group("ark_aot_js_assert_test") { 50 testonly = true 51 deps = [] 52 test_assert_list = [ "emptyif" ] 53 foreach(test, test_assert_list) { 54 deps += [ "${test}:${test}AotAssertAction" ] 55 if (!is_debug) { 56 deps += [ "${test}:${test}AotContextAssertAction" ] 57 } 58 } 59} 60 61group("ark_aot_ts_test") { 62 testonly = true 63 test_list = [ 64 "add", 65 "array", 66 "array_concat", 67 "array_foreach_inline", 68 "array_forof_test", 69 "array_inline_exception", 70 "array_pop_inline", 71 "ashr", 72 "asyncgenerator", 73 "asyncgeneratormultiloop", 74 "asyncgeneratorrest", 75 "async_context", 76 "async_env", 77 "await", 78 "await_loop", 79 "bc_builder", 80 "bind", 81 "binaryop_special_value", 82 "builtinmath", 83 "builtin_math1", 84 "builtin_math2", 85 "builtins_decode_uri_component", 86 "builtins_string", 87 "call_builtin_objects", 88 "call_same_bytecode_func", 89 "callithisrange", 90 "calls", 91 "classstatic", 92 "class_method_signature", 93 "closeiterator", 94 "combined_pass", 95 "compiler_test", 96 "constpool", 97 "construct_deopt_frame_stack_overflow", 98 "construct_deopt_frame_stack_overflow2", 99 "continue_from_finally", 100 "copyrestargs", 101 "createarray_meta_data", 102 "createarrayimm16", 103 "createarraywithbuffer", 104 "createemptyarray", 105 "createemptyobject", 106 "creategeneratorobj", 107 "createiterresultobj", 108 "createobjecthavingmethod", 109 "createobjectwithbuffer", 110 "createobjectwithexcludedkeys", 111 "createregexpwithliteral", 112 "dataview_native_inline", 113 "dec", 114 "default_supers", 115 "defineasyncfunc", 116 "defineclasswithbuffer", 117 "defineclass", 118 "definefunc", 119 "definefunc_variable_args", 120 "definegeneratorfunc", 121 "definegettersetterbyvalue", 122 "definemethod", 123 "definencfunc", 124 "delobjprop", 125 "deopt", 126 "deopt_clear_aotflags", 127 "destructuring", 128 "div", 129 "duplicatefunctions", 130 "duplicatekey", 131 "elements_kind", 132 "elements_kind_update", 133 "shr_overflow", 134 "equal_nan", 135 "exception_case1", 136 "exception_case10", 137 "exception_case11", 138 "exception_case12", 139 "exception_case13", 140 "exception_case15", 141 "exception_case16", 142 "exception_case2", 143 "exception_case3", 144 "exception_case4", 145 "exception_case5", 146 "exception_case6", 147 "exception_case7", 148 "exception_case8", 149 "exception_case9", 150 "exp", 151 "extends_builtins", 152 "fast_call_builtins", 153 "fast_call_func_check", 154 "frame_iteration", 155 "frame_states", 156 "forin_delete_property", 157 "forin_dictionary_mode", 158 "forin_empty_prototype", 159 "forin_enum_cache", 160 "forin_non_empty_prototype", 161 "forin_special_object", 162 "forloop", 163 "framestatesalloc", 164 "framestatesasync", 165 "framestatesphi", 166 "framestates_elimination", 167 "generatormerge", 168 "generatorcontinuefinally", 169 "getiterator", 170 "getiteratornext", 171 "getnextpropname", 172 "getpropiterator", 173 "getresumemode", 174 "gettemplateobject", 175 "getunmappedargs", 176 "global_this_ts", 177 "generic_instance_type_literal", 178 "helloaot", 179 "helloconcurrent", 180 "icnotfound", 181 "ic", 182 "inc", 183 "inline", 184 "inline_array_exception", 185 "instanceof", 186 "intern_string_strict_equal1", 187 "intern_string_strict_equal2", 188 "isfalse", 189 "isin", 190 "isomorphism", 191 "isprototype", 192 "istrue", 193 "jsonstringify", 194 "large_func", 195 "large_func_acc", 196 "ldbigint", 197 "ldconst", 198 "ldfunctionpref", 199 "ldglobalvar", 200 "ldobjbyname", 201 "ldobjbyname_typed_path", 202 "ldobjbyvalue", 203 "ldstlexvar", 204 "ldsuperbyname", 205 "load_local_module_var", 206 "logic_op", 207 "loop_peeling", 208 "loop_phi", 209 "loop_with_variable_exchange", 210 "loops", 211 "map", 212 "map_values", 213 "mod", 214 "modules", 215 "mono_builtin", 216 "mul", 217 "multi_module_compilation", 218 "neg", 219 "nested_if_try_emptycatch", 220 "nested_try_emptycatch", 221 "nested_try_emptycatch_finally", 222 "new", 223 "newlexenv", 224 "newobjrange", 225 "newobjspread", 226 "noreturn", 227 "not", 228 "not_equal", 229 "numberspeculativeretype", 230 "object_literal", 231 "operations_stub_test", 232 "optimization", 233 "optimized_call", 234 "or", 235 "ordinaryhasinstance", 236 "pgo_aot_call_deopt_bridge", 237 "pgo_aot_newobj", 238 "pgo_array_prototype", 239 "pgo_builtins", 240 "pgo_call", 241 "pgo_call_builtin_ctor", 242 "pgo_call_js", 243 "pgo_float32array_construct", 244 "pgo_class_operation", 245 "pgo_class_prototype", 246 "pgo_constant_value_deopt", 247 "pgo_constructor_number", 248 "pgo_element_transition", 249 "pgo_elimination_loadconstoffset", 250 "pgo_fast_call_bridge", 251 "pgo_fast_call_deopt_bridge", 252 "pgo_forof_array", 253 "pgo_forof_map", 254 "pgo_forof_set", 255 "pgo_forof_string", 256 "pgo_forof_typed_array", 257 "pgo_function_prototype", 258 "pgo_gettersetter", 259 "pgo_extrainfomap_expand", 260 "pgo_extrainfomap_gc", 261 "pgo_inherited_function_operation", 262 "pgo_ldobjbyvalue_array", 263 "pgo_ldobjbyvalue_string", 264 "pgo_retype", 265 "pgo_length", 266 "pgo_loop_peeling", 267 "pgo_math", 268 "pgo_napi1", 269 "pgo_napi2", 270 "pgo_objectliteral_operation", 271 "pgo_object_prototype", 272 "pgo_createobjectwithbuffer", 273 "pgo_profiletypeinfo", 274 "pgo_call_deopt_js", 275 "pgo_call_recursive_js", 276 "pgo_storemiss", 277 278 #"pgo_call_with_repetitive_method_id", 279 "pgo_char_to_string_deopt", 280 "pgo_on_heap", 281 "pgo_space_flag", 282 "pgo_store_deopt", 283 "pgo_track_type", 284 "poplexenv", 285 "proxy", 286 "privateproperty", 287 "privateproperty_js", 288 "resumegenerator", 289 "rodata", 290 "setobjectwithproto", 291 "set", 292 "shl", 293 "shr", 294 "specialloops", 295 "starrayspread", 296 "statesplit", 297 "stclasstoglobalrecord", 298 "stconsttoglobalrecord", 299 "stglobalvar", 300 "stlettoglobalrecord", 301 "stobjbyindex", 302 "stobjbyname", 303 "stobjbyname1", 304 "stobjbyvalue", 305 "stownbyindex", 306 "stownbyname", 307 "stownbynamewithnameset", 308 "stownbyvalue", 309 "stownbyvaluewithnameset", 310 "strictequal", 311 "strictnotequal", 312 "string", 313 "string_add", 314 "string_equal", 315 "string_inline", 316 "string_localecompare", 317 "string_slice", 318 "string_sub_string", 319 "string_sub_str", 320 "stsuperbyname", 321 "sub", 322 "supercall", 323 "supercallspread", 324 "supercallforward", 325 "suspendgenerator", 326 "suspendgeneratorbranch", 327 "suspendgeneratorfor", 328 "suspendgeneratorphi", 329 "suspendgeneratorreturn", 330 "suspendgeneratorthrow", 331 "throw", 332 "throwifsupernotcorrectcall", 333 "throwundefindeifhole", 334 "tonumber", 335 "tonumeric", 336 "try", 337 "try_catch_finally", 338 "try_emptycatch_forloop", 339 "try_emptycatch_nested", 340 "try_emptycatch_switch_case", 341 "try_forloop_emptycatch", 342 "tryldglobalbyname_global_object", 343 "tryldglobalbyname_global_record", 344 "trystglobalbynameprefid32", 345 "ts_hclass_generator", 346 "typedarray", 347 "typedarray_load_store", 348 "typedarrayfill", 349 "typedarrayfilter", 350 "typedarraymap", 351 "typeof", 352 "unaryop_special_value", 353 "useless_gate_elimination", 354 "xor", 355 "sharedbitvector", 356 "sharedcheck", 357 "sharedarray", 358 "sharedcollectionsexception", 359 "sharedmap", 360 "sharedJSON", 361 "sharedset", 362 "definesendableclass", 363 "sendableenv", 364 "sendablefunc", 365 "sendablecontext", 366 "sync_representation", 367 "createarraywithbuffer2", 368 "createarraywithbuffer3", 369 "builtins_number", 370 "builtins_number2", 371 "builtins_parseint", 372 "constructor", 373 "proxy_fast_call", 374 "realm", 375 "shared_module", 376 "func_profile_type_info", 377 "sendable", 378 "webkit_call_convention", 379 "retype_isnan", 380 "inline_abs", 381 "retype_test", 382 "retype_test2", 383 "retype_unreachable_test", 384 ] 385 386 if (!is_debug) { 387 test_list += [ 388 "pgo_function_operation", 389 "proxy2", 390 391 #"lexenv_specialization", 392 #"lexenv_specialization_multi_inline", 393 #"lexenv_specialization_noopt", 394 #"loop_hoist", 395 #"pgo_call_deopt", 396 #"ts_inline", 397 #"ts_inline_accessor", 398 #"ts_inline_accessor_deopt", 399 #"ts_inline_accessor_extends", 400 #"ts_inline_accessor_same_name", 401 #"ts_inline_accessor_symbol", 402 #"ts_inline_change_target", 403 #"ts_inline_deopt", 404 #"ts_inline_deopt_loop", 405 #"ts_inline_exception1", 406 #"ts_inline_exception2", 407 #"ts_inline_exception3", 408 #"ts_inline_exception4", 409 #"ts_inline_exception5", 410 #"ts_inline_exception6", 411 #"ts_inline_exception7", 412 #"ts_inline_exception8", 413 #"ts_inline_extends", 414 #"ts_inline_loop", 415 #"ts_inline_max_call", 416 #"ts_multi_inline", 417 #"ts_multi_inline_deopt", 418 #"ts_multi_inline_max_call", 419 #"ts_multi_inline_recursive", 420 ] 421 } 422 423 deps = [ "builtin_inlining:ark_aot_builtin_inlining_test" ] 424 425 foreach(test, test_list) { 426 deps += [ "${test}:${test}AotAction" ] 427 if (!is_debug) { 428 deps += [ "${test}:${test}AotContextAction" ] 429 } 430 } 431 432 if (is_debug) { 433 debug_test_list = [ 434 # builtins_stub test only print log in debug mode 435 "builtins_array", 436 "builtins_stub", 437 ] 438 foreach(test, debug_test_list) { 439 deps += [ "${test}:${test}AotAction" ] 440 } 441 } 442} 443 444group("ark_aot_ts_assert_test") { 445 testonly = true 446 447 deps = [] 448 assert_test_list = [ 449 "and", 450 "array_bounds_check_elimination", 451 "check_dump", 452 "empty", 453 ] 454 foreach(test, assert_test_list) { 455 deps += [ "${test}:${test}AotAssertAction" ] 456 if (!is_debug) { 457 deps += [ "${test}:${test}AotContextAssertAction" ] 458 } 459 } 460} 461 462group("ark_aot_test") { 463 testonly = true 464 deps = [ 465 ":ark_aot_js_assert_test", 466 ":ark_aot_js_test", 467 ":ark_aot_ts_assert_test", 468 ":ark_aot_ts_test", 469 "analyze_property:analyze_property_test", 470 "aot_compatibility_test:aot_compatibility_test", 471 "aot_multi_constantpool_test:aot_multi_constantpool_test", 472 "aot_type_test:aot_type_test", 473 "object:object_test", 474 "vtable:vtable_test", 475 ] 476 477 if (is_mac) { 478 deps -= [ 479 ":ark_aot_js_assert_test", 480 ":ark_aot_js_test", 481 ":ark_aot_ts_assert_test", 482 ":ark_aot_ts_test", 483 "aot_type_test:aot_type_test", 484 ] 485 } 486} 487