• 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 = [
34    "$ark_third_party_root/icu/icu4c:shared_icui18n",
35    "$ark_third_party_root/icu/icu4c:shared_icuuc",
36    "$js_root:libark_jsruntime_test",
37  ]
38
39  # hiviewdfx libraries
40  external_deps = hiviewdfx_ext_deps
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 = [
59    "$ark_third_party_root/icu/icu4c:shared_icui18n",
60    "$ark_third_party_root/icu/icu4c:shared_icuuc",
61    "$js_root:libark_jsruntime_test",
62  ]
63
64  # hiviewdfx libraries
65  external_deps = hiviewdfx_ext_deps
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_stack_test.cpp",
75    "containers_treemap_test.cpp",
76    "containers_treeset_test.cpp",
77    "containers_vector_test.cpp",
78  ]
79
80  configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ]
81
82  deps = [
83    "$ark_third_party_root/icu/icu4c:shared_icui18n",
84    "$ark_third_party_root/icu/icu4c:shared_icuuc",
85    "$js_root:libark_jsruntime_test",
86  ]
87
88  # hiviewdfx libraries
89  external_deps = hiviewdfx_ext_deps
90  deps += hiviewdfx_deps
91}
92
93host_unittest_action("Containers_004_Test") {
94  module_out_path = module_output_path
95
96  sources = [
97    # test file
98    "containers_bitvector_test.cpp",
99  ]
100
101  configs = [ "../../../:ecma_test_config" ]
102
103  deps = [
104    "$ark_third_party_root/icu/icu4c:shared_icui18n",
105    "$ark_third_party_root/icu/icu4c:shared_icuuc",
106    "$js_root:libark_jsruntime_test",
107  ]
108
109  # hiviewdfx libraries
110  external_deps = hiviewdfx_ext_deps
111  deps += hiviewdfx_deps
112}
113
114group("unittest") {
115  testonly = true
116
117  # deps file
118  deps = [
119    ":Containers_001_Test",
120    ":Containers_002_Test",
121    ":Containers_003_Test",
122    ":Containers_004_Test",
123  ]
124}
125
126group("host_unittest") {
127  testonly = true
128
129  # deps file
130  deps = [
131    ":Containers_001_TestAction",
132    ":Containers_002_TestAction",
133    ":Containers_003_TestAction",
134  ]
135
136  if (is_mac) {
137    deps -= [
138      ":Containers_001_TestAction",
139      ":Containers_002_TestAction",
140      ":Containers_003_TestAction",
141    ]
142  }
143}
144