Add runtime_core ut to GGW

Issue: IAYWOR

Signed-off-by: renguangxuan <renguangxuan@huawei.com>
Change-Id: If037e50de44100cbad99bef21bc6047919849f7c
This commit is contained in:
renguangxuan 2024-09-30 14:38:45 +08:00
parent 528348816f
commit 54bd8d1735
9 changed files with 73 additions and 37 deletions

View File

@ -360,18 +360,7 @@ group("ark_host_mac_defectscanaux_unittest") {
}
}
if (!ark_standalone_build) {
group("runtime_core_unittest") {
testonly = true
deps = [
"$ark_root/arkplatform/tests:unittest",
"$ark_root/libpandabase/tests:unittest",
"$ark_root/libpandafile/tests:unittest",
"$ark_root/libziparchive/tests:unittest",
]
}
group("runtime_core_host_unittest") {
group("runtime_core_host_unittest") {
testonly = true
deps = [
"$ark_root/abc2program/tests:host_unittest",
@ -387,6 +376,17 @@ if (!ark_standalone_build) {
"$ark_root/platforms/tests:host_unittest",
"$ark_root/verifier/tests:host_unittest",
]
}
if (!ark_standalone_build) {
group("runtime_core_unittest") {
testonly = true
deps = [
"$ark_root/arkplatform/tests:unittest",
"$ark_root/libpandabase/tests:unittest",
"$ark_root/libpandafile/tests:unittest",
"$ark_root/libziparchive/tests:unittest",
]
}
group("verifier_host_unittest") {

View File

@ -13,7 +13,6 @@
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/arkplatform/arkplatform_config.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
group("arkplatform_packages") {
if (enable_arkplatform) {
@ -35,10 +34,10 @@ ohos_source_set("arkplatform_static") {
part_name = "runtime_core"
subsystem_name = "arkcompiler"
external_deps = [
"ets_runtime:libark_jsruntime",
"hilog:libhilog",
]
external_deps = [ "ets_runtime:libark_jsruntime" ]
if (!ark_standalone_build) {
external_deps += [ "hilog:libhilog" ]
}
}
ohos_shared_library("libarkplatform") {

View File

@ -12,3 +12,19 @@
# limitations under the License.
js_root = "//arkcompiler/ets_runtime"
if (!defined(ark_standalone_build)) {
ark_standalone_build = false
}
if (ark_standalone_build) {
import("//arkcompiler/toolchain/build/config/sanitizers/sanitizers.gni")
enable_arkplatform = false
} else {
import("//build/config/sanitizers/sanitizers.gni")
enable_arkplatform = true
}
if (is_asan && use_hwasan) {
enable_arkplatform = false
}

View File

@ -14,7 +14,6 @@
import("//arkcompiler/runtime_core/ark_config.gni")
import("//arkcompiler/runtime_core/arkplatform/arkplatform_config.gni")
import("//arkcompiler/runtime_core/arkplatform/tests/test_helper.gni")
import("//arkcompiler/runtime_core/static_vm_config.gni")
host_unittest_action("ArkplatformTest") {
module_out_path = module_output_path

View File

@ -82,9 +82,14 @@ host_unittest_action("AssemblerTest") {
"$ark_root/libpandabase:libarkbase",
"$ark_root/libpandafile:libarkfile",
"$ark_root/libziparchive:libarkziparchive",
"//third_party/googletest:gtest_main",
]
if (ark_standalone_build) {
deps += [ "$build_root/third_party_gn/googletest:gtest_main" ]
} else {
deps += [ "//third_party/googletest:gtest_main" ]
}
external_deps = [ sdk_libc_secshared_dep ]
test_abc_dir = rebase_path(target_out_dir)
defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ]

View File

@ -99,7 +99,7 @@ static void *TestThread5(void *input)
HWTEST_F(MutexTest, RWLockTest, testing::ext::TestSize.Level0)
{
size_t res;
size_t res = 0;
auto *rwlock = new os::memory::RWLock();
ThreadRWLockArgs arg = {rwlock, &res};

View File

@ -230,7 +230,7 @@ ohos_source_set("libarkfile_static_fuzz") {
subsystem_name = "arkcompiler"
}
source_set("libarkfile_static_verifier") {
ohos_source_set("libarkfile_static_verifier") {
sources = libarkfile_sources
public_configs = [
@ -244,11 +244,21 @@ source_set("libarkfile_static_verifier") {
"$ark_root/libpandabase:libarkbase_static",
"$ark_root/libziparchive:libarkziparchive_static",
]
external_deps = []
external_deps += [
if (!ark_standalone_build) {
public_external_deps = [
"zlib:shared_libz",
sdk_libc_secshared_dep,
]
} else {
external_deps = [
"zlib:shared_libz",
sdk_libc_secshared_dep,
]
}
part_name = "runtime_core"
subsystem_name = "arkcompiler"
}
ohos_shared_library("libarkfile") {

View File

@ -43,9 +43,14 @@ host_unittest_action("LibPandaFileTest") {
deps = [
"$ark_root/assembler:libarkassembler_static",
"$ark_root/libpandafile:libarkfile_static",
"//third_party/googletest:gmock_main",
]
if (ark_standalone_build) {
deps += [ "$build_root/third_party_gn/googletest:gmock_main" ]
} else {
deps += [ "//third_party/googletest:gmock_main" ]
}
external_deps = [
"zlib:libz",
sdk_libc_secshared_dep,

View File

@ -30,10 +30,12 @@ host_unittest_action("PlatformsTest") {
sdk_libc_secshared_config,
]
deps = [
"$ark_root/libpandabase:libarkbase_static",
"//third_party/googletest:gmock_main",
]
deps = [ "$ark_root/libpandabase:libarkbase_static" ]
if (ark_standalone_build) {
deps += [ "$build_root/third_party_gn/googletest:gmock_main" ]
} else {
deps += [ "//third_party/googletest:gmock_main" ]
}
external_deps = [ sdk_libc_secshared_dep ]