• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("../../../js_runtime_config.gni")
15import("../../../test/test_helper.gni")
16
17module_output_path = "ets_runtime"
18
19host_unittest_action("OhosTest") {
20  module_out_path = module_output_path
21
22  sources = [
23    # test file
24    "mock/mock_enable_aot_list_helper.cpp",
25    "ohos_test.cpp",
26  ]
27
28  configs = [
29    "$js_root:ecma_test_config",
30    "$ark_root/assembler:arkassembler_public_config",
31  ]
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    "$js_root/ecmascript/compiler:libark_jsoptimizer_set",
38  ]
39
40  # hiviewdfx libraries
41  external_deps = hiviewdfx_ext_deps
42  deps += hiviewdfx_deps
43  external_deps += [ "zlib:libz" ]
44}
45
46host_unittest_action("CrashTest") {
47  module_out_path = module_output_path
48
49  sources = [
50    # test file
51    "crash_test.cpp",
52    "mock/mock_aot_runtime_info.cpp",
53  ]
54
55  configs = [
56    "$js_root:ecma_test_config",
57    "$ark_root/assembler:arkassembler_public_config",
58  ]
59
60  deps = [
61    "$ark_third_party_root/icu/icu4c:shared_icui18n",
62    "$ark_third_party_root/icu/icu4c:shared_icuuc",
63    "$js_root:libark_jsruntime_test",
64    "$js_root/ecmascript/compiler:libark_jsoptimizer_set",
65  ]
66
67  # hiviewdfx libraries
68  external_deps = hiviewdfx_ext_deps
69  deps += hiviewdfx_deps
70  external_deps += [ "zlib:libz" ]
71}
72
73group("unittest") {
74  testonly = true
75  deps = [
76    ":CrashTest",
77    ":OhosTest",
78  ]
79}
80
81group("host_unittest") {
82  testonly = true
83  deps = [
84    ":CrashTestAction",
85    ":OhosTestAction",
86  ]
87  if (is_mac) {
88    deps -= [
89      ":CrashTestAction",
90      ":OhosTestAction",
91    ]
92  }
93}
94