• 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/runtime_core/ark_config.gni")
15import("$ark_root/tests/test_helper.gni")
16
17host_unittest_action("LibPandaBaseTest") {
18  module_out_path = module_output_path
19
20  sources = [
21    "arch_test.cpp",
22    "arena_allocator_test.cpp",
23    "base_mem_stats_test.cpp",
24    "base_thread_test.cpp",
25    "bit_vector_test.cpp",
26    "cframe_layout_test.cpp",
27    "code_allocator_test.cpp",
28    "json_parser_test.cpp",
29    "logger_test.cpp",
30    "math_helpers_test.cpp",
31    "mem_space_test.cpp",
32    "mmap_mem_pool_test.cpp",
33    "pandargs_test.cpp",
34    "pool_map_test.cpp",
35    "regmask_test.cpp",
36    "type_converter_tests.cpp",
37    "unique_fd_test.cpp",
38    "utf_test.cpp",
39  ]
40
41  if (is_linux) {
42    sources += [
43      "genmc/mutex_test_2.cpp",
44      "mutex_test.cpp",
45      "unix_error_test.cpp",
46      "unix_exec_test.cpp",
47      "unix_file_test.cpp",
48      "unix_library_loader_test.cpp",
49      "unix_native_stack_test.cpp",
50      "unix_thread_test.cpp",
51    ]
52  }
53
54  configs = [
55    "$ark_root:ark_config",
56    "$ark_root/libpandabase:arkbase_public_config",
57    sdk_libc_secshared_config,
58  ]
59
60  deps = [
61    "$ark_root/libpandabase:libarkbase_static",
62    sdk_libc_secshared_dep,
63  ]
64}
65
66group("unittest") {
67  testonly = true
68  deps = [ ":LibPandaBaseTest" ]
69}
70
71group("host_unittest") {
72  testonly = true
73  deps = [ ":LibPandaBaseTestAction" ]
74}
75