• 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
17module_out_path = "$ark_root/bytecode_optimizer"
18
19ohos_executable("bcopt_type_adapter_unit_test") {
20  sources = [ "bcopt_type_adaption_test.cpp" ]
21
22  configs = [
23    "$ark_root:ark_config",
24    "$ark_root/assembler:arkassembler_public_config",
25    "$ark_root/runtime:arkruntime_public_config",
26    "$ark_root/libpandabase:arkbase_public_config",
27    "$ark_root/libpandafile:arkfile_public_config",
28    "$ark_root/compiler:arkcompiler_public_config",
29    "$ark_root/bytecode_optimizer:bytecodeopt_public_config",
30    sdk_libc_secshared_config,
31  ]
32
33  deps = [ sdk_libc_secshared_dep ]
34
35  if (is_linux || is_mingw || is_mac) {
36    deps += [
37      "$ark_root/assembler:libarkassembler_frontend_static",
38      "$ark_root/bytecode_optimizer:libarkbytecodeopt_frontend_static",
39      "$ark_root/compiler:libarkcompiler_frontend_static",
40      "$ark_root/libpandabase:libarkbase_frontend_static",
41      "$ark_root/libpandafile:libarkfile_frontend_static",
42      "$ark_root/libziparchive:libarkziparchive_frontend_static",
43    ]
44  } else {
45    deps += [
46      "$ark_root/assembler:libarkassembler",
47      "$ark_root/bytecode_optimizer:libarkbytecodeopt",
48      "$ark_root/compiler:libarkcompiler",
49      "$ark_root/libpandabase:libarkbase",
50      "$ark_root/libpandafile:libarkfile",
51      "$ark_root/libziparchive:libarkziparchive",
52    ]
53  }
54
55  if (is_linux) {
56    if (build_public_version) {
57      ldflags = [ "-static-libstdc++" ]
58    } else {
59      libs = [ libcpp_static_lib ]
60    }
61  }
62
63  output_name = "bcopt_type_adapter_unit_test"
64  install_enable = false
65  part_name = "runtime_core"
66  subsystem_name = "arkcompiler"
67}
68
69bcopt_test_config = [
70  "$ark_root:ark_config",
71  "$ark_root/assembler:arkassembler_public_config",
72  "$ark_root/libpandabase:arkbase_public_config",
73  "$ark_root/libpandafile:arkfile_public_config",
74  "$ark_root/compiler:arkcompiler_public_config",
75  "$ark_root/bytecode_optimizer:bytecodeopt_public_config",
76  sdk_libc_secshared_config,
77]
78
79bcopt_test_deps = [
80  "$ark_root/assembler:libarkassembler",
81  "$ark_root/bytecode_optimizer:libarkbytecodeopt",
82  "$ark_root/compiler:libarkcompiler",
83  "$ark_root/libpandabase:libarkbase",
84  "$ark_root/libpandafile:libarkfile",
85  "$ark_root/libziparchive:libarkziparchive",
86  sdk_libc_secshared_dep,
87]
88
89host_unittest_action("ExcludedKeysTest") {
90  module_out_path = module_output_path
91  sources = [ "excluded_keys_test.cpp" ]
92  configs = bcopt_test_config
93  deps = bcopt_test_deps
94}
95
96group("host_unittest") {
97  testonly = true
98  deps = [ ":ExcludedKeysTestAction" ]
99}
100