# Copyright (c) 2024 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("../../compiler_service_test.gni") import("//arkcompiler/ets_runtime/js_runtime_config.gni") config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "${compiler_service_root}/include", "${compiler_service_root}/interface", ] cflags = [ "-Wno-error=keyword-macro", "-Wno-nested-anon-types", "-Wno-gnu-anonymous-struct", "-Wno-variadic-macros", ] } ohos_unittest("AotCompilerProxyUnitTest") { module_out_path = module_output_path configs = [ ":module_private_config", "$js_root:ark_jsruntime_public_config", ] version_script = "${compiler_service_root}/libaot_compiler_service.map" sources = [ "${js_root}/common_components/log/log.cpp", "${compiler_service_root}/interface/aot_compiler_interface_proxy.cpp", "${compiler_service_root}/interface/aot_compiler_interface_stub.cpp", "${compiler_service_root}/src/aot_args_handler.cpp", "${compiler_service_root}/src/aot_compiler_client.cpp", "${compiler_service_root}/src/aot_compiler_error_utils.cpp", "${compiler_service_root}/src/aot_compiler_impl.cpp", "${compiler_service_root}/src/aot_compiler_load_callback.cpp", "${compiler_service_root}/src/aot_compiler_service.cpp", "${compiler_service_root}/src/power_disconnected_listener.cpp", "${compiler_service_root}/src/screen_status_listener.cpp", "${compiler_service_root}/src/thermal_mgr_listener.cpp", ] if (is_mingw) { sources += [ "${js_root}/ecmascript/platform/windows/file.cpp", ] } else { sources += [ "${js_root}/ecmascript/platform/unix/file.cpp", ] } deps = [ "${compiler_service_root}:libcompiler_service", ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "icu:shared_icui18n", "icu:shared_icuuc", "ipc:ipc_core", "runtime_core:libarkfile_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [] if (code_sign_enable_test) { external_deps += [ "code_signature:liblocal_code_sign_sdk" ] defines += [ "CODE_SIGN_ENABLE" ] } sources += [ "aotcompilerproxy_unit.cpp" ] }