mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
!5008 Add debugger end to end UT
Merge pull request !5008 from weng-changcheng/add_e2e_ut
This commit is contained in:
commit
056398f55e
@ -94,7 +94,7 @@ HWTEST_F_L0(HeapSamplingTest, ImplementSampling)
|
||||
int stackDepth = 128; // default depth
|
||||
std::unique_ptr<HeapSampling> heapSampling = std::make_unique<HeapSampling>(instance,
|
||||
const_cast<Heap *>(instance->GetHeap()), samplingInterval, stackDepth);
|
||||
int size = 1 << 15; // default size
|
||||
size_t size = 1U << 15U; // default size
|
||||
Address addr = 0;
|
||||
heapSampling->ImplementSampling(addr, size);
|
||||
const SamplingInfo *result = heapSampling->GetAllocationProfile();
|
||||
|
@ -2206,6 +2206,7 @@ JSTaggedValue JSObject::TryGetEnumCache(JSThread *thread, JSTaggedValue obj)
|
||||
break;
|
||||
case EnumCacheKind::PROTOCHAIN:
|
||||
isEnumCacheValid = IsEnumCacheWithProtoChainInfoValid(obj);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -109,10 +109,11 @@ public:
|
||||
CVector<panda_file::File::EntityId> methodIds;
|
||||
panda_file::ClassDataAccessor cda(pandaFile, id);
|
||||
CString recordName = JSPandaFile::ParseEntryPoint(utf::Mutf8AsCString(cda.GetDescriptor()));
|
||||
// the recordName for testcases is empty
|
||||
// Check record name in stage mode
|
||||
if (!jsPandaFile_->IsBundlePack()) {
|
||||
// the recordName for testcases is empty
|
||||
if (!debugRecordName.empty()) {
|
||||
auto iter = debugRecordName.find(std::string(recordName));
|
||||
auto iter = debugRecordName.find(std::string(recordName.c_str()));
|
||||
if (iter == debugRecordName.end()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -443,6 +443,7 @@ bool JSNApi::StartDebugger([[maybe_unused]] EcmaVM *vm, [[maybe_unused]] const D
|
||||
}
|
||||
auto handle = panda::os::library_loader::Load(std::string(option.libraryPath));
|
||||
if (!handle) {
|
||||
LOG_ECMA(ERROR) << "[StartDebugger] Load library fail: " << option.libraryPath << " " << errno;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -451,7 +452,7 @@ bool JSNApi::StartDebugger([[maybe_unused]] EcmaVM *vm, [[maybe_unused]] const D
|
||||
|
||||
auto sym = panda::os::library_loader::ResolveSymbol(handle.Value(), "StartDebug");
|
||||
if (!sym) {
|
||||
LOG_ECMA(ERROR) << sym.Error().ToString();
|
||||
LOG_ECMA(ERROR) << "[StartDebugger] Resolve symbol fail: " << sym.Error().ToString();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,6 @@ public:
|
||||
ASSERT_TRUE(instance != nullptr) << "Cannot create EcmaVM";
|
||||
thread = instance->GetJSThread();
|
||||
scope = new EcmaHandleScope(thread);
|
||||
auto globalEnv = instance->GetGlobalEnv();
|
||||
methodFunction_ = instance->GetFactory()->NewJSFunction(globalEnv);
|
||||
}
|
||||
|
||||
static inline void DestroyEcmaVMWithScope(EcmaVM *instance, EcmaHandleScope *scope)
|
||||
@ -126,13 +124,8 @@ public:
|
||||
delete scope;
|
||||
scope = nullptr;
|
||||
instance->SetEnableForceGC(false);
|
||||
auto thread = instance->GetJSThread();
|
||||
thread->ClearException();
|
||||
JSNApi::DestroyJSVM(instance);
|
||||
}
|
||||
|
||||
private:
|
||||
inline static ecmascript::JSHandle<ecmascript::JSFunction> methodFunction_;
|
||||
};
|
||||
} // namespace panda::test
|
||||
#endif // ECMASCRIPT_TESTS_TEST_HELPER_H
|
||||
|
@ -99,8 +99,7 @@ template("host_unittest_action") {
|
||||
rebase_path("${clang_base_path}/lib/${musl_arch}-linux-ohos",
|
||||
root_build_dir),
|
||||
"--qemu-binary-path",
|
||||
rebase_path("${QEMU_INSTALLATION_PATH}/bin/qemu-${musl_arch}",
|
||||
root_build_dir),
|
||||
"${QEMU_INSTALLATION_PATH}/bin/qemu-${musl_arch}",
|
||||
"--qemu-ld-prefix",
|
||||
rebase_path(musl_linker_so_out_dir, root_build_dir),
|
||||
"--timeout-limit",
|
||||
|
Loading…
Reference in New Issue
Block a user