• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14module_test_list = [
15  "addelementinternal",
16  "allocatearraybuffer",
17  "array",
18  "arrayderived",
19  "arraypushproto",
20  "arraySome",
21  "arrayEvery",
22  "arrayspeciescreate",
23  "arrayconstructor",
24  "arrayspliceproto",
25  "arrayunshiftproto",
26  "arrayfillproto",
27  "arrayconcat",
28  "arrayfind",
29  "arrayfindlast",
30  "arrayfill",
31  "arrayflat",
32  "arrayflatmap",
33  "arrayfindindex",
34  "arrayfindlastindex",
35  "arrayforeach",
36  "arrayfrom",
37  "arrayjoin",
38  "arraymap",
39  "getiterator",
40  "arraypop",
41  "arraytoreversed",
42  "arraytospliced",
43  "arraywith",
44  "arraystablecheck",
45  "arraysort",
46  "arrayspread",
47  "arrayprotochange",
48  "arrayshift",
49  "arrayslice",
50  "arraysplice",
51  "arktoolsgetundetectable",
52  "arktoolshavesamemap",
53  "assignproxy",
54  "asyncgenerator",
55  "asyncUseLazyValue",
56  "barrier",
57  "bigint",
58  "bindfunction",
59  "bitwiseop",
60  "builtins",
61  "callframe",
62  "calltype",
63  "changelistener",
64  "class",
65  "clampedarray",
66  "compareobjecthclass",
67  "concurrent",
68  "container",
69  "createarray",
70  "createobject",
71  "dataproperty",
72  "datecase",
73  "datecompare",
74  "dateparse",
75  "datetimezone",
76  "decodeuricomponent",
77  "definefield",
78  "definefunc",
79  "deleteobjproperty",
80  "div",
81  "dynamicimport",
82  "dyninstruction",
83  "ecmastringtable",
84  "internstring",
85  "equal",
86  "errorhelper",
87  "errorcause",
88  "exp",
89  "flatten",
90  "forawaitof",
91  "forin",
92  "forin_delete_property",
93  "forin_dictionary_mode",
94  "forin_empty_prototype",
95  "forin_enum_cache",
96  "forin_non_empty_prototype",
97  "forin_primitive",
98  "forin_special_object",
99  "fortest",
100  "funcprotochangeobjectandnew",
101  "functionapply",
102  "generator",
103  "getdeletedelementsat",
104  "getpropertybyindex",
105  "getunmappedargs",
106  "global",
107  "globalaccessor",
108  "globalrecord",
109  "globalthis",
110  "helloworld",
111  "ictest",
112  "includesindexof",
113  "instanceofic",
114  "intl",
115  "isin",
116  "memleakobjectcreate",
117  "merge",
118  "module",
119  "moduleHandleException",
120  "moduleImportJson",
121  "moduleLazyImport",
122  "moduleTopLevelAwait",
123  "moduleUseCjs",
124  "multiargs",
125  "multiprotoic",
126  "negintmin",
127  "newobjdynrange",
128  "newtaggedsubarray",
129  "nextinternalslowpath",
130  "object",
131  "objectcloneproperties",
132  "objectdefineproperties",
133  "objectgetownproperty",
134  "objecthasownproperty",
135  "objectkeys",
136  "objoperate",
137  "objseal",
138  "promise",
139  "promiseUseLazyValue",
140  "promiseUseLazyValueInDynamic",
141  "propertydetector",
142  "protobuf",
143  "proxy",
144  "realm",
145  "regressproxy",
146  "rangeerror",
147  "regexpcallthrow",
148  "regexpflagd",
149  "regressfunction",
150  "regexpmaxindex",
151  "regress",
152  "regressparseInt",
153  "regressmathmaxmin",
154
155  "string",
156  "stringlocalecompare",
157  "stringrepeat",
158  "sharedcheck",
159  "sharedarray",
160  "shareduse",
161  "sharedtypedarray",
162  "sharedcollectionsexception",
163  "definesendableclass",
164  "sendableenv",
165  "sendablefunc",
166  "sendablecontext",
167  "sendableclassuseimport",
168  "sharedmodule",
169  "sharedset",
170  "sharedmap",
171  "sharedJSON",
172  "sharedic",
173  "sendable",
174  "sharedobjectstorebarrier_treestring",
175]
176
177group("ark_js_moduletest") {
178  testonly = true
179  test_list = module_test_list
180  test_list += [ "async" ]  # asm interpreter run too long
181  deps = []
182  foreach(test, test_list) {
183    deps += [ "${test}:${test}Action" ]
184    if (!is_debug) {
185      deps += [ "${test}:${test}ContextAction" ]
186    }
187  }
188
189  if (!is_debug) {
190    release_test_list = [ "typedarrayrelease" ]
191
192    foreach(test, release_test_list) {
193      deps += [
194        "${test}:${test}Action",
195        "${test}:${test}ContextAction",
196      ]
197    }
198  }
199}
200
201group("ark_js_assert_moduletest") {
202  testonly = true
203  assert_test_list = [
204    "addpropertybyname",
205    "cowarray",
206    "jsonparser",
207    "jsonstringifier",
208    "ldmodulensbyic",
209    "lexicalenv",
210    "linkedhashtable",
211    "loadicbyname",
212    "loadicbyvalue",
213    "localelowercase",
214    "mapforeach",
215    "mapget",
216    "regressdefineproperty",
217    "regresssstring",
218    "require",
219    "setobjectwithproto",
220    "spreadoperator",
221    "stackoverflow",
222    "storeglobalvarIC",
223    "storeicbyname",
224    "storeicbyvalue",
225    "stringfromcharcode",
226    "stringreplace",
227    "stringreplaceall",
228    "stringsplit",
229    "stubbuilder",
230    "throwdyn",
231    "throwerror",
232    "trycatch",
233    "typearray",
234    "typedarrayat",
235    "typedarrayfill",
236    "typedarrayfilter",
237    "typedarrayfindlast",
238    "typedarrayfrom",
239
240    #"typedarrayfrom_in_api14",
241    "typedarrayiterator",
242    "typedarraymap",
243    "typedarraynan",
244    "typedarrayreverse",
245    "typedarraysort",
246    "typedarraysubarray",
247    "typedarraytosorted",
248    "typedarraywith",
249    "typedarrayjoin",
250    "watch",
251    "weakcollectionswithsymbol",
252    "wrapperclassfunc",
253    "yieldstar",
254    "esmnestedimportcjs",
255    "regexp",
256    "deregistermodule",
257    "getpropertybyic",
258    "regressbufferdetach",
259    "regressdate",
260    "regresssuper",
261    "objectfreeze",
262    "getvaluefrombuffer",
263  ]
264
265  deps = []
266  foreach(test, assert_test_list) {
267    deps += [ "${test}:${test}AssertAction" ]
268    if (!is_debug) {
269      deps += [ "${test}:${test}ContextAssertAction" ]
270    }
271  }
272
273  if (!is_debug) {
274    release_test_assert_list = [
275      "hugearray",
276      "hugeictest",
277      "multiconstpoolarray",
278      "multiconstpoolclass",
279      "multiconstpoolconstructor",
280      "multiconstpoolfunc",
281      "multiconstpoolobj",
282      "proxyrelease",
283    ]
284
285    foreach(test, release_test_assert_list) {
286      deps += [
287        "${test}:${test}AssertAction",
288        "${test}:${test}ContextAssertAction",
289      ]
290    }
291  }
292}
293
294group("ark_asm_test") {
295  testonly = true
296  test_list = module_test_list
297  test_list += [
298    "arrayincludesindexof",  # C interpreter do not support elementskind.
299    "elements_kind",  # C interpreter do not support elementskind.
300    "allocatesizeoverflow",  # different bound check for C and ASM interpreter
301  ]
302  deps = []
303  foreach(test, test_list) {
304    deps += [ "${test}:${test}AsmAction" ]
305    if (!is_debug) {
306      deps += [ "${test}:${test}AsmContextAction" ]
307    }
308  }
309
310  if (!is_debug) {
311    release_test_list = [
312      "throwerrorrelease",
313      "typedarrayrelease",
314    ]
315
316    foreach(test, release_test_list) {
317      deps += [
318        "${test}:${test}AsmAction",
319        "${test}:${test}AsmContextAction",
320      ]
321    }
322  }
323}
324
325group("ark_asm_assert_test") {
326  testonly = true
327  assert_test_list = [
328    "addpropertybyname",
329    "cowarray",
330    "jsonparser",
331    "jsonstringifier",
332    "ldmodulensbyic",
333    "lexicalenv",
334    "linkedhashtable",
335    "loadicbyvalue",
336    "mapforeach",
337    "mapget",
338    "setobjectwithproto",
339    "spreadoperator",
340    "stackoverflow",
341    "stringreplace",
342    "stringreplaceall",
343    "stringsplit",
344    "stubbuilder",
345    "throwdyn",
346    "throwerror",
347    "trycatch",
348    "typearray",
349    "typedarrayat",
350    "typedarrayfill",
351    "typedarrayfilter",
352    "typedarrayfindlast",
353    "typedarrayfrom",
354
355    #"typedarrayfrom_in_api14",
356    "typedarrayiterator",
357    "typedarraymap",
358    "typedarraynan",
359    "typedarrayreverse",
360    "typedarraysort",
361    "typedarraytosorted",
362    "typedarraywith",
363    "watch",
364    "weakcollectionswithsymbol",
365    "wrapperclassfunc",
366    "yieldstar",
367    "regexp",
368    "deregistermodule",
369    "getpropertybyic",
370    "getvaluefrombuffer",
371  ]
372  deps = []
373
374  foreach(test, assert_test_list) {
375    deps += [ "${test}:${test}AsmAssertAction" ]
376    if (!is_debug) {
377      deps += [ "${test}:${test}AsmContextAssertAction" ]
378    }
379  }
380
381  if (!is_debug) {
382    release_test_assert_list = [
383      "asmstackoverflow",
384      "arrayRelease",
385      "hugearray",
386      "hugeictest",
387      "supercallRelease",
388      "multiconstpoolarray",
389      "multiconstpoolclass",
390      "multiconstpoolconstructor",
391      "multiconstpoolfunc",
392      "multiconstpoolobj",
393      "proxyrelease",
394    ]
395
396    foreach(test, release_test_assert_list) {
397      deps += [
398        "${test}:${test}AsmAssertAction",
399        "${test}:${test}AsmContextAssertAction",
400      ]
401    }
402  }
403}
404
405group("ark_asm_single_step_test") {
406  testonly = true
407  test_list = [
408    "addelementinternal",
409    "allocatearraybuffer",
410    "allocatesizeoverflow",
411    "arrayfindindex",
412    "arrayfind",
413    "arraySome",
414    "arrayEvery",
415    "arrayfindlast",
416    "arrayflat",
417    "arrayflatmap",
418    "arrayfindlastindex",
419    "arrayforeach",
420    "arrayincludesindexof",
421    "arrayjoin",
422    "arraymap",
423    "getiterator",
424    "arraypop",
425    "arrayprotochange",
426    "arrayshift",
427    "arrayslice",
428    "arrayspeciescreate",
429    "arrayconstructor",
430    "arrayspread",
431    "assignproxy",
432    "barrier",
433    "bigint",
434    "bindfunction",
435    "bitwiseop",
436    "callframe",
437    "calltype",
438    "changelistener",
439    "class",
440    "compareobjecthclass",
441    "concurrent",
442    "container",
443    "createobject",
444    "dataproperty",
445    "decodeuricomponent",
446    "definefield",
447    "dynamicimport",
448    "dyninstruction",
449    "ecmastringtable",
450    "internstring",
451    "errorcause",
452    "exp",
453    "forin",
454    "forin_delete_property",
455    "forin_dictionary_mode",
456    "forin_empty_prototype",
457    "forin_enum_cache",
458    "forin_non_empty_prototype",
459    "forin_primitive",
460    "forin_special_object",
461    "fortest",
462    "funcprotochangeobjectandnew",
463    "functionapply",
464    "generator",
465    "getdeletedelementsat",
466    "getunmappedargs",
467    "global",
468    "globalaccessor",
469    "globalrecord",
470    "globalthis",
471    "helloworld",
472    "instanceofic",
473    "module",
474    "multiargs",
475    "multiprotoic",
476    "negintmin",
477    "newobjdynrange",
478    "newtaggedsubarray",
479    "nextinternalslowpath",
480    "number",
481    "object",
482    "objectcloneproperties",
483    "objecthasownproperty",
484    "objectkeys",
485    "objoperate",
486    "objseal",
487    "promise",
488    "propertydetector",
489    "proxy",
490    "realm",
491    "rangeerror",
492    "regexpcallthrow",
493    "regexpflagd",
494    "string",
495    "sharedcheck",
496    "sharedarray",
497    "shareduse",
498    "sharedtypedarray",
499    "sharedcollectionsexception",
500    "definesendableclass",
501    "sendableenv",
502    "sendablefunc",
503    "sendablecontext",
504    "sendableclassuseimport",
505    "sharedmodule",
506    "sharedic",
507    "sharedset",
508    "sharedmap",
509    "sharedJSON",
510    "sendable",
511    "sharedobjectstorebarrier_treestring",
512  ]
513
514  deps = []
515  foreach(test, test_list) {
516    deps += [ "${test}:${test}AsmSingleStepAction" ]
517    if (!is_debug) {
518      deps += [ "${test}:${test}AsmSingleStepContextAction" ]
519    }
520  }
521  if (!is_debug) {
522    release_test_list = [ "typedarrayrelease" ]
523
524    foreach(test, release_test_list) {
525      deps += [
526        "${test}:${test}AsmSingleStepAction",
527        "${test}:${test}AsmSingleStepContextAction",
528      ]
529    }
530  }
531}
532
533group("ark_asm_single_step_assert_test") {
534  testonly = true
535  assert_test_list = [
536    "addpropertybyname",
537    "cowarray",
538    "jsonparser",
539    "jsonstringifier",
540    "ldmodulensbyic",
541    "lexicalenv",
542    "loadicbyvalue",
543    "mapforeach",
544    "mapget",
545    "setobjectwithproto",
546    "spreadoperator",
547    "stackoverflow",
548    "stringreplace",
549    "stringreplaceall",
550    "stringsplit",
551    "stubbuilder",
552    "throwdyn",
553    "throwerror",
554    "trycatch",
555    "typearray",
556    "typedarrayat",
557    "typedarrayfill",
558    "typedarrayfilter",
559    "typedarrayfindlast",
560    "typedarrayfrom",
561
562    #"typedarrayfrom_in_api14",
563    "typedarrayiterator",
564    "typedarraymap",
565    "typedarraynan",
566    "typedarrayreverse",
567    "typedarraysort",
568    "typedarraytosorted",
569    "typedarraywith",
570    "watch",
571    "weakcollectionswithsymbol",
572    "yieldstar",
573    "getpropertybyic",
574    "regressarraybuffer",
575    "getvaluefrombuffer",
576  ]
577
578  deps = []
579  foreach(test, assert_test_list) {
580    deps += [ "${test}:${test}AsmSingleStepAssertAction" ]
581    if (!is_debug) {
582      deps += [ "${test}:${test}AsmSingleStepContextAssertAction" ]
583    }
584  }
585  if (!is_debug) {
586    release_test_assert_list = [
587      "asmstackoverflow",
588      "arrayRelease",
589      "supercallRelease",
590      "multiconstpoolarray",
591      "multiconstpoolclass",
592      "multiconstpoolconstructor",
593      "multiconstpoolfunc",
594      "multiconstpoolobj",
595      "proxyrelease",
596    ]
597
598    foreach(test, release_test_assert_list) {
599      deps += [
600        "${test}:${test}AsmSingleStepAssertAction",
601        "${test}:${test}AsmSingleStepContextAssertAction",
602      ]
603    }
604  }
605}
606