• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("JS_Job_MicroJobQueueTest") {
19  module_out_path = module_output_path
20
21  sources = [
22    # test file
23    "micro_job_queue_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  deps += hiviewdfx_deps
36  external_deps += [
37    "icu:shared_icui18n",
38    "icu:shared_icuuc",
39    "runtime_core:libarkassembler_static",
40    "runtime_core:libarkverifier",
41    "zlib:libz",
42  ]
43}
44
45host_unittest_action("JS_Job_PendingJobTest") {
46  module_out_path = module_output_path
47
48  sources = [
49    # test file
50    "pending_job_test.cpp",
51  ]
52
53  configs = [
54    "../../../:asm_interp_enable_config",
55    "../../../:ecma_test_config",
56  ]
57
58  deps = [ "../../../:libark_jsruntime_test" ]
59
60  # hiviewdfx libraries
61  external_deps = hiviewdfx_ext_deps
62  deps += hiviewdfx_deps
63  external_deps += [
64    "icu:shared_icui18n",
65    "icu:shared_icuuc",
66    "runtime_core:libarkassembler_static",
67    "runtime_core:libarkverifier",
68    "zlib:libz",
69  ]
70}
71
72group("unittest") {
73  testonly = true
74
75  # deps file
76  deps = [
77    ":JS_Job_MicroJobQueueTest",
78    ":JS_Job_PendingJobTest",
79  ]
80}
81
82group("host_unittest") {
83  testonly = true
84
85  # deps file
86  deps = [
87    ":JS_Job_MicroJobQueueTestAction",
88    ":JS_Job_PendingJobTestAction",
89  ]
90
91  if (is_mac) {
92    deps -= [
93      ":JS_Job_MicroJobQueueTestAction",
94      ":JS_Job_PendingJobTestAction",
95    ]
96  }
97}
98