1# Copyright (c) 2022 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/test/test_helper.gni")
15
16hot_reload_test_list = [
17  # "check_import",
18  # "same_methodname",
19  "class_inheritance",
20  "class_mem_func",
21  "class_same_mem_func",
22  "class_mem_var",
23  "class_name",
24  "closure",
25  "global_func",
26  "global_var",
27  "import_export",
28  "lazy_import",
29  "print_string",
30  "record_not_same",
31  "module_var",
32  "module_func",
33  "module_class",
34  "module_class_inheritance",
35]
36
37hot_reload_cold_patch_test_list = []
38
39if (!is_debug) {
40  hot_reload_cold_patch_test_list += [
41    "cold_classmemfunc",
42    "cold_closure",
43    "cold_printstring",
44    "cold_classmemvar",
45  ]
46
47  hot_reload_test_list += [
48    "multi_classconstpool",
49    "multi_closureconstpool",
50    "multi_constructorconstpool",
51    "multi_funccallconstpool",
52    "multi_funcconstpool",
53    "multiconstpool_multifunc",
54  ]
55}
56
57hot_patch_test_list = [
58  "add_callfunction",
59  # "external_method",
60]
61
62host_quickfix_test_action("multi_patch") {
63  extra_patches = [
64    "patch1",
65    "patch2",
66  ]
67  entry_point = "--entry-point=base"
68}
69
70foreach(testcase, hot_reload_test_list) {
71  host_quickfix_test_action("${testcase}") {
72    entry_point = "--entry-point=base"
73    if (!is_debug) {
74      is_gen_js_by_script = true
75    }
76  }
77}
78
79foreach(testcase, hot_patch_test_list) {
80  host_quickfix_test_action("${testcase}") {
81    entry_point = "--entry-point=base"
82    is_hotpatch = true
83  }
84}
85
86foreach(testcase, hot_reload_cold_patch_test_list) {
87  host_quickfix_test_action("${testcase}") {
88    entry_point = "--entry-point=base:coldpatch"
89  }
90}
91
92group("ark_quickfix_test") {
93  testonly = true
94
95  deps = []
96  foreach(testcase, hot_reload_test_list) {
97    deps += [ ":${testcase}QuickfixAction" ]
98  }
99
100  foreach(testcase, hot_patch_test_list) {
101    deps += [ ":${testcase}QuickfixAction" ]
102  }
103
104  foreach(testcase, hot_reload_cold_patch_test_list) {
105    deps += [ ":${testcase}QuickfixAction" ]
106  }
107
108  deps += [ ":multi_patchQuickfixAction" ]
109}
110