• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/js_runtime_config.gni")
15import("//arkcompiler/ets_runtime/test/test_helper.gni")
16
17module_output_path = "ets_runtime"
18
19host_unittest_action("Containers_001_Test") {
20  module_out_path = module_output_path
21
22  sources = [
23    # test file
24    "containers_arraylist_test.cpp",
25    "containers_deque_test.cpp",
26    "containers_hashmap_test.cpp",
27    "containers_hashset_test.cpp",
28    "containers_lightweightmap_test.cpp",
29  ]
30
31  configs = [ "../../../:ecma_test_config" ]
32
33  deps = [ "$js_root:libark_jsruntime_test" ]
34
35  # hiviewdfx libraries
36  external_deps = hiviewdfx_ext_deps
37  external_deps += [
38    "icu:shared_icui18n",
39    "icu:shared_icuuc",
40  ]
41  deps += hiviewdfx_deps
42}
43
44host_unittest_action("Containers_002_Test") {
45  module_out_path = module_output_path
46
47  sources = [
48    # test file
49    "containers_lightweightset_test.cpp",
50    "containers_linked_list_test.cpp",
51    "containers_list_test.cpp",
52    "containers_plainarray_test.cpp",
53    "containers_queue_test.cpp",
54  ]
55
56  configs = [ "../../../:ecma_test_config" ]
57
58  deps = [ "$js_root:libark_jsruntime_test" ]
59
60  # hiviewdfx libraries
61  external_deps = hiviewdfx_ext_deps
62  external_deps += [
63    "icu:shared_icui18n",
64    "icu:shared_icuuc",
65  ]
66  deps += hiviewdfx_deps
67}
68
69host_unittest_action("Containers_003_Test") {
70  module_out_path = module_output_path
71
72  sources = [
73    # test file
74    "containers_buffer_test.cpp",
75    "containers_stack_test.cpp",
76    "containers_treemap_test.cpp",
77    "containers_treeset_test.cpp",
78    "containers_vector_test.cpp",
79  ]
80
81  configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ]
82
83  deps = [ "$js_root:libark_jsruntime_test" ]
84
85  # hiviewdfx libraries
86  external_deps = hiviewdfx_ext_deps
87  external_deps += [
88    "icu:shared_icui18n",
89    "icu:shared_icuuc",
90  ]
91  deps += hiviewdfx_deps
92}
93
94host_unittest_action("Containers_004_Test") {
95  module_out_path = module_output_path
96
97  sources = [
98    # test file
99    "containers_bitvector_test.cpp",
100  ]
101
102  configs = [ "../../../:ecma_test_config" ]
103
104  deps = [ "$js_root:libark_jsruntime_test" ]
105
106  # hiviewdfx libraries
107  external_deps = hiviewdfx_ext_deps
108  external_deps += [
109    "icu:shared_icui18n",
110    "icu:shared_icuuc",
111  ]
112  deps += hiviewdfx_deps
113}
114
115group("unittest") {
116  testonly = true
117
118  # deps file
119  deps = [
120    ":Containers_001_Test",
121    ":Containers_002_Test",
122    ":Containers_003_Test",
123    ":Containers_004_Test",
124  ]
125}
126
127group("host_unittest") {
128  testonly = true
129
130  # deps file
131  deps = [
132    ":Containers_001_TestAction",
133    ":Containers_002_TestAction",
134    ":Containers_003_TestAction",
135  ]
136
137  if (is_mac) {
138    deps -= [
139      ":Containers_001_TestAction",
140      ":Containers_002_TestAction",
141      ":Containers_003_TestAction",
142    ]
143  }
144}
145