• 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"
18host_unittest_action("CJS_Manager_Test") {
19  module_out_path = module_output_path
20
21  sources = [
22    # test file
23    "js_cjs_manager_test.cpp",
24  ]
25
26  configs = [
27    "../../../:asm_interp_enable_config",
28    "../../../:ecma_test_config",
29  ]
30
31  deps = [ "../../../:libark_jsruntime_test" ]
32
33  # hiviewdfx libraries
34  external_deps = hiviewdfx_ext_deps
35  external_deps += [
36    "icu:shared_icui18n",
37    "icu:shared_icuuc",
38    "zlib:libz",
39  ]
40  deps += hiviewdfx_deps
41}
42
43host_unittest_action("CJS_ManagerCache_Test") {
44  module_out_path = module_output_path
45
46  sources = [
47    # test file
48    "js_cjs_module_cache_test.cpp",
49  ]
50
51  configs = [
52    "../../../:asm_interp_enable_config",
53    "../../../:ecma_test_config",
54  ]
55
56  deps = [ "../../../:libark_jsruntime_test" ]
57
58  # hiviewdfx libraries
59  external_deps = hiviewdfx_ext_deps
60  external_deps += [
61    "icu:shared_icui18n",
62    "icu:shared_icuuc",
63    "zlib:libz",
64  ]
65  deps += hiviewdfx_deps
66}
67
68host_unittest_action("CJS_Module_Test") {
69  module_out_path = module_output_path
70
71  sources = [
72    # test file
73    "js_cjs_manager_test.cpp",
74    "js_cjs_module_cache_test.cpp",
75    "js_cjs_module_test.cpp",
76  ]
77
78  configs = [
79    "../../../:asm_interp_enable_config",
80    "../../../:ecma_test_config",
81  ]
82
83  deps = [ "../../../: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    "zlib:libz",
91  ]
92  deps += hiviewdfx_deps
93}
94
95group("unittest") {
96  testonly = true
97
98  # deps file
99  deps = [
100    ":CJS_ManagerCache_Test",
101    ":CJS_Manager_Test",
102    ":CJS_Module_Test",
103  ]
104}
105
106group("host_unittest") {
107  testonly = true
108
109  # deps file
110  deps = [
111    ":CJS_ManagerCache_TestAction",
112    ":CJS_Manager_TestAction",
113    ":CJS_Module_TestAction",
114  ]
115
116  if (is_mac) {
117    deps -= [
118      ":CJS_ManagerCache_TestAction",
119      ":CJS_Manager_TestAction",
120      ":CJS_Module_TestAction",
121    ]
122  }
123}
124