fix quickfix unittest

Issue: #I5Z0Y5
Signed-off-by: g00416891 <guobingbing3@huawei.com>
Change-Id: Ifd63fd63e42fd57681b12fb3ed83e579c2556d5d
This commit is contained in:
g00416891 2022-11-02 13:54:29 +08:00 committed by Gymee
parent f63333137d
commit 9ad3b2a7dd
4 changed files with 20 additions and 10 deletions

View File

@ -739,6 +739,7 @@ source_set("libark_jsruntime_test_set") {
sources += ecma_profiler_source
sources += ecma_debugger_source
defines = [ "OHOS_UNIT_TEST" ]
deps = [
"$ark_root/libpandafile:arkfile_header_deps",
"$ark_third_party_root/icu/icu4c:shared_icui18n",
@ -763,16 +764,12 @@ source_set("libark_jsruntime_test_set") {
if (is_linux && (current_cpu == "x86" || current_cpu == "x64")) {
sources += [ "ecmascript/dfx/native_dfx/linux/backtrace.cpp" ]
}
defines = [
defines += [
"ECMASCRIPT_ENABLE_HANDLE_LEAK_CHECK",
"ECMASCRIPT_ENABLE_GLOBAL_LEAK_CHECK",
]
}
if (is_ohos && is_standard_system) {
defines = [ "OHOS_UNIT_TEST" ]
}
public_configs = [
"$js_root:ark_jsruntime_common_config",
"$js_root:ark_jsruntime_public_config",

View File

@ -145,7 +145,11 @@ host_unittest_action("JSPandaFileTest") {
":gen_patch_abc",
]
test_abc_dir = rebase_path(target_out_dir)
if (is_ohos && is_standard_system) {
test_abc_dir = "/data/test"
} else {
test_abc_dir = rebase_path(target_out_dir)
}
defines = [ "QUICKFIX_ABC_PATH=\"${test_abc_dir}/\"" ]
}

View File

@ -61,6 +61,8 @@ HWTEST_F_L0(QuickFixTest, HotReload_SingleFile)
JSNApi::EnableUserUncaughtErrorHandler(instance);
JSNApi::SetBundle(instance, false);
bool result = JSNApi::Execute(instance, baseFileName, "index");
EXPECT_TRUE(result);
@ -82,6 +84,8 @@ HWTEST_F_L0(QuickFixTest, HotReload_MultiFile)
JSNApi::EnableUserUncaughtErrorHandler(instance);
JSNApi::SetBundle(instance, false);
bool result = JSNApi::Execute(instance, baseFileName, "index");
EXPECT_TRUE(result);

View File

@ -55,10 +55,10 @@
</target>
<target name="JSPandaFileTest">
<preparer>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/single_file/base/index.abc -> /data/test" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/single_file/patch/index.abc -> /data/test" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/multi_file/patch/index.abc -> /data/test" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/multi_file/patch/index.abc -> /data/test" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/single_file/base/index.abc -> /data/test/single_file/base/" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/single_file/patch/index.abc -> /data/test/single_file/patch/" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/multi_file/base/index.abc -> /data/test/multi_file/base/" src="out"/>
<option name="push" value="obj/arkcompiler/ets_runtime/ecmascript/jspandafile/tests/multi_file/patch/index.abc -> /data/test/multi_file/patch/" src="out"/>
<option name="push" value="test/test/libark_jsruntime_test.so -> /data/test" src="out"/>
</preparer>
</target>
@ -134,6 +134,11 @@
<option name="push" value="test/test/libark_jsruntime_test.so -> /data/test" src="out"/>
</preparer>
</target>
<target name="DumpHeapSnapshot3FuzzTest">
<preparer>
<option name="push" value="test/test/libark_jsruntime_test.so -> /data/test" src="out"/>
</preparer>
</target>
<target name="JSNApiDeserializeValueFuzzTest">
<preparer>
<option name="push" value="test/test/libark_jsruntime_test.so -> /data/test" src="out"/>