!842 Clear security alerts of the auto-test framework

Merge pull request !842 from ZitongLi/autotest
This commit is contained in:
openharmony_ci 2024-08-30 17:27:07 +00:00 committed by Gitee
commit df72da88d7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 40 additions and 10 deletions

View File

@ -9,7 +9,7 @@
- IDE将应用推入设备并拉起应用或attach到已启动应用上
- IDE与应用建立websocket连接
- IDE与应用之间通过websocket发送和接受调试调优相关的业务消息消息格式遵循CDPChrome DevTools Protocol协议
- IDE与应用之间通过websocket发送和接受调试调优相关的业务消息消息格式遵循CDP协议
该自动化框架依据以上流程实现了应用启动、websocket连接、消息交互等步骤的自动化基于此可以进行调试调优用例的执行与开发

View File

@ -1,3 +1,21 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
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.
Description: __init__.py of the aw package
"""
from aw.websocket import WebSocket
from aw.application import Application
from aw.utils import Utils

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2024 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
@ -63,7 +65,7 @@ class TaskPool(object):
loop.run_forever()
async def _stop_loop(self, interval=1):
# wait for all tasks in the event loop id done, then we can close the loop
# wait for all tasks in the event loop is done, then we can close the loop
while True:
if self.task_queue.empty():
self.event_loop.stop()

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2024 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
@ -33,14 +35,6 @@ class Utils(object):
yield message_id
message_id += 1
@classmethod
def get_device_type(cls):
cmd = ['hdc', 'shell', 'param', 'get', 'const.product.devicetype']
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.stdout.decode('utf-8').strip() == 'default':
return 'rk'
return None
@classmethod
def get_custom_protocols(cls):
protocols = ["removeBreakpointsByUrl",

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- 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,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2024 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");