• 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("//ark/js_runtime/js_runtime_config.gni")
15import("//ark/js_runtime/test/test_helper.gni")
16import("//build/test.gni")
17
18module_output_path = "ark/js_runtime"
19
20host_unittest_action("HeapTrackerTest") {
21  module_out_path = module_output_path
22
23  sources = [
24    # test file
25    "heap_tracker_test.cpp",
26  ]
27
28  configs = [
29    "//ark/js_runtime:ecma_test_config",
30    "//ark/js_runtime:ark_jsruntime_public_config",  # should add before
31                                                     # arkruntime_public_config
32    "//ark/js_runtime:ark_jsruntime_common_config",
33    "$ark_root/runtime:arkruntime_public_config",
34  ]
35
36  deps = [
37    "$ark_root/libpandabase:libarkbase",
38    "//ark/js_runtime:libark_jsruntime_test",
39    sdk_libc_secshared_dep,
40  ]
41
42  if (!is_standard_system) {
43    deps += [ "$ark_root/runtime:libarkruntime" ]
44  }
45}
46
47host_unittest_action("HprofTest") {
48  module_out_path = module_output_path
49
50  sources = [
51    # test file
52    "hprof_test.cpp",
53  ]
54
55  configs = [
56    "//ark/js_runtime:ecma_test_config",
57    "//ark/js_runtime:ark_jsruntime_public_config",  # should add before
58                                                     # arkruntime_public_config
59    "//ark/js_runtime:ark_jsruntime_common_config",
60    "$ark_root/runtime:arkruntime_public_config",
61  ]
62
63  deps = [
64    "$ark_root/libpandabase:libarkbase",
65    "//ark/js_runtime:libark_jsruntime_test",
66    sdk_libc_secshared_dep,
67  ]
68
69  if (!is_standard_system) {
70    deps += [ "$ark_root/runtime:libarkruntime" ]
71  }
72}
73
74group("unittest") {
75  testonly = true
76  deps = [ ":HeapTrackerTest" ]
77}
78
79group("host_unittest") {
80  testonly = true
81  deps = [ ":HeapTrackerTestAction" ]
82}
83