• 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 = "arkcompiler/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    "../../../:libark_jsruntime_test",
37    sdk_libc_secshared_dep,
38  ]
39
40  # hiviewdfx libraries
41  external_deps = hiviewdfx_ext_deps
42  deps += hiviewdfx_deps
43}
44
45host_unittest_action("Containers_002_Test") {
46  module_out_path = module_output_path
47
48  sources = [
49    # test file
50    "containers_lightweightset_test.cpp",
51    "containers_linked_list_test.cpp",
52    "containers_list_test.cpp",
53    "containers_plainarray_test.cpp",
54    "containers_queue_test.cpp",
55  ]
56
57  configs = [ "../../../:ecma_test_config" ]
58
59  deps = [
60    "$ark_third_party_root/icu/icu4c:shared_icui18n",
61    "$ark_third_party_root/icu/icu4c:shared_icuuc",
62    "../../../:libark_jsruntime_test",
63    sdk_libc_secshared_dep,
64  ]
65
66  # hiviewdfx libraries
67  external_deps = hiviewdfx_ext_deps
68  deps += hiviewdfx_deps
69}
70
71host_unittest_action("Containers_003_Test") {
72  module_out_path = module_output_path
73
74  sources = [
75    # test file
76    "containers_stack_test.cpp",
77    "containers_treemap_test.cpp",
78    "containers_treeset_test.cpp",
79    "containers_vector_test.cpp",
80  ]
81
82  configs = [ "//arkcompiler/ets_runtime:ecma_test_config" ]
83
84  deps = [
85    "$ark_third_party_root/icu/icu4c:shared_icui18n",
86    "$ark_third_party_root/icu/icu4c:shared_icuuc",
87    "//arkcompiler/ets_runtime:libark_jsruntime_test",
88    sdk_libc_secshared_dep,
89  ]
90
91  # hiviewdfx libraries
92  external_deps = hiviewdfx_ext_deps
93  deps += hiviewdfx_deps
94}
95
96host_unittest_action("Containers_004_Test") {
97  module_out_path = module_output_path
98
99  sources = [
100    # test file
101    "containers_bitvector_test.cpp",
102  ]
103
104  configs = [ "../../../:ecma_test_config" ]
105
106  deps = [
107    "$ark_third_party_root/icu/icu4c:shared_icui18n",
108    "$ark_third_party_root/icu/icu4c:shared_icuuc",
109    "../../../:libark_jsruntime_test",
110    sdk_libc_secshared_dep,
111  ]
112
113  # hiviewdfx libraries
114  external_deps = hiviewdfx_ext_deps
115  deps += hiviewdfx_deps
116}
117
118group("unittest") {
119  testonly = true
120
121  # deps file
122  deps = [
123    ":Containers_001_Test",
124    ":Containers_002_Test",
125    ":Containers_003_Test",
126    ":Containers_004_Test",
127  ]
128}
129
130group("host_unittest") {
131  testonly = true
132
133  # deps file
134  deps = [
135    ":Containers_001_TestAction",
136    ":Containers_002_TestAction",
137    ":Containers_003_TestAction",
138  ]
139
140  if (is_mac) {
141    deps -= [
142      ":Containers_001_TestAction",
143      ":Containers_002_TestAction",
144      ":Containers_003_TestAction",
145    ]
146  }
147}
148