Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Xdevice
提交
e2448c80
T
Test Xdevice
项目概览
OpenHarmony
/
Test Xdevice
大约 1 年 前同步成功
通知
6
Star
23
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Test Xdevice
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e2448c80
编写于
11月 15, 2021
作者:
A
alex__hold
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sync master code
Signed-off-by:
N
alex__hold
<
hejian3@huawei.com
>
上级
3962ebd8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
7 deletion
+17
-7
extension/src/xdevice_extension/_core/driver/drivers.py
extension/src/xdevice_extension/_core/driver/drivers.py
+8
-1
extension/src/xdevice_extension/_core/environment/device.py
extension/src/xdevice_extension/_core/environment/device.py
+2
-2
extension/src/xdevice_extension/_core/testkit/kit.py
extension/src/xdevice_extension/_core/testkit/kit.py
+3
-3
run.sh
run.sh
+0
-0
src/xdevice/_core/executor/scheduler.py
src/xdevice/_core/executor/scheduler.py
+4
-1
未找到文件。
extension/src/xdevice_extension/_core/driver/drivers.py
浏览文件 @
e2448c80
...
@@ -1597,7 +1597,14 @@ class JSUnitTestDriver(IDriver):
...
@@ -1597,7 +1597,14 @@ class JSUnitTestDriver(IDriver):
request
.
root
.
source
.
source_string
,
error_no
=
"00110"
)
request
.
root
.
source
.
source_string
,
error_no
=
"00110"
)
LOG
.
debug
(
"Test case file path: %s"
%
suite_file
)
LOG
.
debug
(
"Test case file path: %s"
%
suite_file
)
self
.
config
.
device
.
hdc_command
(
"shell hilog -r"
)
# avoid hilog service stuck issue
self
.
config
.
device
.
hdc_command
(
"shell stop_service hilogd"
,
timeout
=
30
*
1000
)
self
.
config
.
device
.
hdc_command
(
"shell start_service hilogd"
,
timeout
=
30
*
1000
)
time
.
sleep
(
10
)
self
.
config
.
device
.
hdc_command
(
"shell hilog -r"
,
timeout
=
30
*
1000
)
self
.
_run_jsunit
(
config_file
,
request
)
self
.
_run_jsunit
(
config_file
,
request
)
except
Exception
as
exception
:
except
Exception
as
exception
:
self
.
error_message
=
exception
self
.
error_message
=
exception
...
...
extension/src/xdevice_extension/_core/environment/device.py
浏览文件 @
e2448c80
...
@@ -38,7 +38,7 @@ from xdevice_extension._core.utils import convert_serial
...
@@ -38,7 +38,7 @@ from xdevice_extension._core.utils import convert_serial
from
xdevice_extension._core.constants
import
DeviceConnectorType
from
xdevice_extension._core.constants
import
DeviceConnectorType
__all__
=
[
"Device"
]
__all__
=
[
"Device"
]
TIMEOUT
=
30
0
*
1000
TIMEOUT
=
9
0
*
1000
RETRY_ATTEMPTS
=
2
RETRY_ATTEMPTS
=
2
DEFAULT_UNAVAILABLE_TIMEOUT
=
20
*
1000
DEFAULT_UNAVAILABLE_TIMEOUT
=
20
*
1000
BACKGROUND_TIME
=
2
*
60
*
1000
BACKGROUND_TIME
=
2
*
60
*
1000
...
@@ -174,7 +174,7 @@ class Device(IDevice):
...
@@ -174,7 +174,7 @@ class Device(IDevice):
"""
"""
Hdc command, ddmlib function.
Hdc command, ddmlib function.
"""
"""
command
=
"
getparam
%s"
%
prop_name
command
=
"
param get
%s"
%
prop_name
stdout
=
self
.
execute_shell_command
(
stdout
=
self
.
execute_shell_command
(
command
,
timeout
=
5
*
1000
,
output_flag
=
False
,
retry
=
retry
,
command
,
timeout
=
5
*
1000
,
output_flag
=
False
,
retry
=
retry
,
abort_on_exception
=
abort_on_exception
).
strip
()
abort_on_exception
=
abort_on_exception
).
strip
()
...
...
extension/src/xdevice_extension/_core/testkit/kit.py
浏览文件 @
e2448c80
...
@@ -560,8 +560,8 @@ class AppInstallKit(ITestKit):
...
@@ -560,8 +560,8 @@ class AppInstallKit(ITestKit):
LOG
.
error
(
"The app file {} does not exist"
.
format
(
app
))
LOG
.
error
(
"The app file {} does not exist"
.
format
(
app
))
continue
continue
if
app_file
.
endswith
(
".hap"
):
if
app_file
.
endswith
(
".hap"
):
# use
app
install command directly
# use install command directly
device
.
hdc_command
(
"
app
install {}"
.
format
(
app_file
))
device
.
hdc_command
(
"install {}"
.
format
(
app_file
))
else
:
else
:
result
=
device
.
install_package
(
result
=
device
.
install_package
(
app_file
,
get_install_args
(
app_file
,
get_install_args
(
...
@@ -579,7 +579,7 @@ class AppInstallKit(ITestKit):
...
@@ -579,7 +579,7 @@ class AppInstallKit(ITestKit):
app_name
=
get_app_name
(
app
)
app_name
=
get_app_name
(
app
)
if
app_name
:
if
app_name
:
device
.
hdc_command
(
"
shell bm uninstall -n
{}"
.
device
.
hdc_command
(
"
uninstall
{}"
.
format
(
app_name
))
format
(
app_name
))
time
.
sleep
(
20
)
time
.
sleep
(
20
)
else
:
else
:
...
...
run.sh
100644 → 100755
浏览文件 @
e2448c80
文件模式从 100644 更改为 100755
src/xdevice/_core/executor/scheduler.py
浏览文件 @
e2448c80
...
@@ -1022,8 +1022,11 @@ class Scheduler(object):
...
@@ -1022,8 +1022,11 @@ class Scheduler(object):
@
classmethod
@
classmethod
def
upload_report_end
(
cls
):
def
upload_report_end
(
cls
):
LOG
.
info
(
"Upload report end"
)
if
Scheduler
.
proxy
is
not
None
:
Scheduler
.
proxy
.
report_end
()
return
from
agent.factory
import
report_end
from
agent.factory
import
report_end
LOG
.
info
(
"upload report end"
)
report_end
()
report_end
()
@
classmethod
@
classmethod
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录