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