Sync code

Sync code to master

Issue:https://gitee.com/openharmony/arkcompiler_toolchain/issues/IAZYAC

Signed-off-by: daiweihao <daiweihao1@huawei.com>
Change-Id: I3353e3e089dd49b3e094b7a2f8bba8cebfa201cb
This commit is contained in:
daiweihao 2024-11-19 10:52:25 +08:00
parent e44525e085
commit f4174bf74a
9 changed files with 23 additions and 7 deletions

View File

@ -66,7 +66,6 @@ ohos_shared_library("ark_debugger") {
if (enable_hilog) {
external_deps = [ "hilog:libhilog" ]
}
innerapi_tags = [ "platformsdk" ]
subsystem_name = "arkcompiler"
part_name = "toolchain"
output_name = "ark_inspector"
@ -116,7 +115,6 @@ ohos_shared_library("connectserver_debugger") {
if (enable_hilog) {
external_deps = [ "hilog:libhilog" ]
}
innerapi_tags = [ "platformsdk" ]
subsystem_name = "arkcompiler"
part_name = "toolchain"
output_name = "ark_connect_inspector"

View File

@ -125,7 +125,6 @@ ohos_shared_library("libark_ecma_debugger") {
if (!is_standard_system) {
relative_install_dir = "ark"
}
innerapi_tags = [ "platformsdk" ]
subsystem_name = "arkcompiler"
part_name = "toolchain"
output_name = "libark_tooling"

View File

@ -113,6 +113,7 @@ bool StartThread(uv_loop_t *loop)
}
auto [fileName, entry] = GetNextPara();
g_mutex.Unlock();
panda::ecmascript::EcmaVM *vm = panda::JSNApi::CreateEcmaVM(g_runtimeOptions);
if (vm == nullptr) {
std::cerr << "Cannot create vm." << std::endl;
@ -121,14 +122,16 @@ bool StartThread(uv_loop_t *loop)
panda::JSNApi::SetBundle(vm, !g_runtimeOptions.GetMergeAbc());
bool ret = ExecutePandaFile(vm, g_runtimeOptions, fileName, entry);
panda::JSNApi::DestroyJSVM(vm);
auto loop = static_cast<uv_loop_t *>(arg);
auto work = new uv_work_t;
std::string msg = GetMsg(ret, msg, fileName);
work->data = new char[msg.size() + 1];
if (strncpy_s(static_cast<char*>(work->data), msg.size() + 1, msg.data(), msg.size()) != EOK) {
std::cerr << "strncpy_s fail." << std::endl;
delete[] static_cast<char*>(work->data);
delete work;
std::abort();
return;
}
uv_queue_work(loop, work, [] (uv_work_t*) {}, [] (uv_work_t* work, int) {
std::cerr << static_cast<char*>(work->data) << std::endl;
@ -173,7 +176,7 @@ int Main(const int argc, const char **argv)
while (std::getline(in, line)) {
if (line.find_last_of(".abc") == std::string::npos) { // endwith
std::cerr << "Not endwith .abc" << line << std::endl;
std::abort();
return -1;
}
g_files.emplace_back(line);
}

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
@ -105,7 +108,7 @@ class JsTestBase(unittest.TestCase):
out_str = str(ret).split('\\n')
pos_start = out_str[0].find("@") + 1
out_str = out_str[0].split('\\r')[0]
panda_dbg.append(out_str[pos_start : ])
panda_dbg.append(out_str[pos_start :])
if len(panda_dbg) == 0:
print('Not exist PandaDebugger with name %s' % dbg_name)
sys.exit(0)

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,3 +1,6 @@
#!/usr/bin/env python
# coding=utf-8
# #
# # Copyright (c) 2024 Huawei Device Co., Ltd.
# # Licensed under the Apache License, Version 2.0 (the "License");
@ -19,6 +22,7 @@ import sys
import unittest
import config
class RunTest:
args = None
suite = unittest.TestSuite()

View File

@ -331,7 +331,7 @@ bool WebSocketServer::InitUnixWebSocket(int socketfd)
SetConnectionSocket(socketfd);
const int flag = fcntl(socketfd, F_GETFL, 0);
if (flag == -1) {
LOGE("InitUnixWebSocket get client state is failed");
LOGE("InitUnixWebSocket get client state is failed, error is %{public}s", strerror(errno));
return false;
}
fcntl(socketfd, F_SETFL, static_cast<size_t>(flag) & ~O_NONBLOCK);