# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//arkcompiler/runtime_core/ark_config.gni") import("$ark_root/tests/test_helper.gni") module_out_path = "$ark_root/bytecode_optimizer" ohos_executable("bcopt_type_adapter_unit_test") { sources = [ "bcopt_type_adaption_test.cpp" ] configs = [ "$ark_root:ark_config", "$ark_root/assembler:arkassembler_public_config", "$ark_root/runtime:arkruntime_public_config", "$ark_root/libpandabase:arkbase_public_config", "$ark_root/libpandafile:arkfile_public_config", "$ark_root/compiler:arkcompiler_public_config", "$ark_root/bytecode_optimizer:bytecodeopt_public_config", sdk_libc_secshared_config, ] deps = [ sdk_libc_secshared_dep ] if (is_linux || is_mingw || is_mac) { deps += [ "$ark_root/assembler:libarkassembler_frontend_static", "$ark_root/bytecode_optimizer:libarkbytecodeopt_frontend_static", "$ark_root/compiler:libarkcompiler_frontend_static", "$ark_root/libpandabase:libarkbase_frontend_static", "$ark_root/libpandafile:libarkfile_frontend_static", "$ark_root/libziparchive:libarkziparchive_frontend_static", ] } else { deps += [ "$ark_root/assembler:libarkassembler", "$ark_root/bytecode_optimizer:libarkbytecodeopt", "$ark_root/compiler:libarkcompiler", "$ark_root/libpandabase:libarkbase", "$ark_root/libpandafile:libarkfile", "$ark_root/libziparchive:libarkziparchive", ] } if (is_linux) { if (build_public_version) { ldflags = [ "-static-libstdc++" ] } else { libs = [ libcpp_static_lib ] } } output_name = "bcopt_type_adapter_unit_test" install_enable = false part_name = "runtime_core" subsystem_name = "arkcompiler" } bcopt_test_config = [ "$ark_root:ark_config", "$ark_root/assembler:arkassembler_public_config", "$ark_root/libpandabase:arkbase_public_config", "$ark_root/libpandafile:arkfile_public_config", "$ark_root/compiler:arkcompiler_public_config", "$ark_root/bytecode_optimizer:bytecodeopt_public_config", sdk_libc_secshared_config, ] bcopt_test_deps = [ "$ark_root/assembler:libarkassembler", "$ark_root/bytecode_optimizer:libarkbytecodeopt", "$ark_root/compiler:libarkcompiler", "$ark_root/libpandabase:libarkbase", "$ark_root/libpandafile:libarkfile", "$ark_root/libziparchive:libarkziparchive", sdk_libc_secshared_dep, ] host_unittest_action("ExcludedKeysTest") { module_out_path = module_output_path sources = [ "excluded_keys_test.cpp" ] configs = bcopt_test_config deps = bcopt_test_deps } group("host_unittest") { testonly = true deps = [ ":ExcludedKeysTestAction" ] }