Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Xdevice
提交
79d51d85
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,发现更多精彩内容 >>
提交
79d51d85
编写于
8月 12, 2021
作者:
fengye515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support lite tdd test
Signed-off-by:
zhangchunbao
<
zhangchunbao515@163.com
>
上级
f6bec771
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
44 addition
and
12 deletion
+44
-12
extension/src/xdevice_extension/_core/driver/drivers.py
extension/src/xdevice_extension/_core/driver/drivers.py
+12
-11
src/xdevice/__init__.py
src/xdevice/__init__.py
+17
-1
src/xdevice/_core/executor/scheduler.py
src/xdevice/_core/executor/scheduler.py
+15
-0
未找到文件。
extension/src/xdevice_extension/_core/driver/drivers.py
浏览文件 @
79d51d85
...
@@ -1350,12 +1350,13 @@ class RemoteDexRunner:
...
@@ -1350,12 +1350,13 @@ class RemoteDexRunner:
command
=
"export BOOTCLASSPATH=$BOOTCLASSPATH:"
\
command
=
"export BOOTCLASSPATH=$BOOTCLASSPATH:"
\
"{remote_path}/{module_name};cd {remote_path}; "
\
"{remote_path}/{module_name};cd {remote_path}; "
\
"app_process -cp {remote_path}/{module_name} / "
\
"app_process -cp {remote_path}/{module_name} / "
\
"ohos.testkit.runner.
Z
UnitRunner {junit_para}{arg_list}"
\
"ohos.testkit.runner.
J
UnitRunner {junit_para}{arg_list}"
\
" --rawLog true --coverage false
--debug false
"
\
" --rawLog true --coverage false "
\
"--classpathToScan {remote_path}/{module_name}"
.
format
(
"--classpathToScan {remote_path}/{module_name}"
.
format
(
remote_path
=
self
.
config
.
remote_path
,
remote_path
=
self
.
config
.
remote_path
,
module_name
=
self
.
config
.
module_name
,
module_name
=
self
.
config
.
module_name
,
junit_para
=
self
.
junit_para
,
arg_list
=
self
.
get_args_command
())
junit_para
=
self
.
junit_para
,
arg_list
=
self
.
get_args_command
())
try
:
try
:
self
.
config
.
device
.
execute_shell_command
(
self
.
config
.
device
.
execute_shell_command
(
...
@@ -1385,18 +1386,18 @@ class RemoteDexRunner:
...
@@ -1385,18 +1386,18 @@ class RemoteDexRunner:
command
=
"export BOOTCLASSPATH=$BOOTCLASSPATH:"
\
command
=
"export BOOTCLASSPATH=$BOOTCLASSPATH:"
\
"{remote_path}/{module_name};cd {remote_path}; "
\
"{remote_path}/{module_name};cd {remote_path}; "
\
"app_process -cp {remote_path}/{module_name} / "
\
"app_process -cp {remote_path}/{module_name} / "
\
"ohos.testkit.runner.
Z
UnitRunner {arg_list} "
\
"ohos.testkit.runner.
J
UnitRunner {arg_list} "
\
"--rawLog true --coverage false "
\
"--rawLog true --coverage false "
\
"--
debug false --
classpathToScan "
\
"--classpathToScan "
\
"{remote_path}/{module_name}"
.
format
(
"{remote_path}/{module_name}"
.
format
(
remote_path
=
self
.
config
.
remote_path
,
remote_path
=
self
.
config
.
remote_path
,
module_name
=
self
.
config
.
module_name
,
module_name
=
self
.
config
.
module_name
,
arg_list
=
self
.
get_args_command
())
arg_list
=
self
.
get_args_command
())
self
.
config
.
device
.
execute_shell_command
(
self
.
config
.
device
.
execute_shell_command
(
command
,
timeout
=
self
.
config
.
timeout
,
command
,
timeout
=
self
.
config
.
timeout
,
receiver
=
handler
,
retry
=
0
)
receiver
=
handler
,
retry
=
0
)
except
ShellCommandUnresponsiveException
:
except
ShellCommandUnresponsiveException
as
_
:
LOG
.
debug
(
"Exception: ShellCommandUnresponsiveException"
)
LOG
.
debug
(
"Exception: ShellCommandUnresponsiveException"
)
finally
:
finally
:
if
not
len
(
test_tracker
.
get_current_run_results
()):
if
not
len
(
test_tracker
.
get_current_run_results
()):
...
...
src/xdevice/__init__.py
浏览文件 @
79d51d85
...
@@ -36,6 +36,8 @@ from _core.exception import DeviceError
...
@@ -36,6 +36,8 @@ from _core.exception import DeviceError
from
_core.exception
import
LiteDeviceError
from
_core.exception
import
LiteDeviceError
from
_core.exception
import
ExecuteTerminate
from
_core.exception
import
ExecuteTerminate
from
_core.exception
import
ReportException
from
_core.exception
import
ReportException
from
_core.exception
import
LiteDeviceExecuteCommandError
from
_core.exception
import
LiteDeviceConnectError
from
_core.constants
import
DeviceTestType
from
_core.constants
import
DeviceTestType
from
_core.constants
import
DeviceLabelType
from
_core.constants
import
DeviceLabelType
from
_core.constants
import
ManagerType
from
_core.constants
import
ManagerType
...
@@ -44,6 +46,8 @@ from _core.constants import ProductForm
...
@@ -44,6 +46,8 @@ from _core.constants import ProductForm
from
_core.constants
import
TestType
from
_core.constants
import
TestType
from
_core.constants
import
CKit
from
_core.constants
import
CKit
from
_core.constants
import
ConfigConst
from
_core.constants
import
ConfigConst
from
_core.constants
import
ComType
from
_core.constants
import
ParserType
from
_core.config.config_manager
import
UserConfigManager
from
_core.config.config_manager
import
UserConfigManager
from
_core.config.resource_manager
import
ResourceManager
from
_core.config.resource_manager
import
ResourceManager
from
_core.executor.listener
import
CaseResult
from
_core.executor.listener
import
CaseResult
...
@@ -63,6 +67,7 @@ from _core.utils import exec_cmd
...
@@ -63,6 +67,7 @@ from _core.utils import exec_cmd
from
_core.utils
import
check_device_name
from
_core.utils
import
check_device_name
from
_core.utils
import
do_module_kit_setup
from
_core.utils
import
do_module_kit_setup
from
_core.utils
import
do_module_kit_teardown
from
_core.utils
import
do_module_kit_teardown
from
_core.utils
import
get_test_component_version
from
_core.environment.manager_env
import
DeviceSelectionOption
from
_core.environment.manager_env
import
DeviceSelectionOption
from
_core.environment.manager_env
import
EnvironmentManager
from
_core.environment.manager_env
import
EnvironmentManager
from
_core.executor.scheduler
import
Scheduler
from
_core.executor.scheduler
import
Scheduler
...
@@ -72,6 +77,9 @@ from _core.report.reporter_helper import ExecInfo
...
@@ -72,6 +77,9 @@ from _core.report.reporter_helper import ExecInfo
from
_core.report.result_reporter
import
ResultReporter
from
_core.report.result_reporter
import
ResultReporter
from
_core.report.__main__
import
main_report
from
_core.report.__main__
import
main_report
from
_core.command.console
import
Console
from
_core.command.console
import
Console
from
_core.testkit.kit_lite
import
DeployKit
from
_core.testkit.kit_lite
import
DeployToolKit
from
_core.environment.manager_env
import
DeviceAllocationState
__all__
=
[
__all__
=
[
"Variables"
,
"Variables"
,
...
@@ -93,6 +101,8 @@ __all__ = [
...
@@ -93,6 +101,8 @@ __all__ = [
"LiteDeviceError"
,
"LiteDeviceError"
,
"ExecuteTerminate"
,
"ExecuteTerminate"
,
"ReportException"
,
"ReportException"
,
"LiteDeviceExecuteCommandError"
,
"LiteDeviceConnectError"
,
"DeviceTestType"
,
"DeviceTestType"
,
"DeviceLabelType"
,
"DeviceLabelType"
,
"ManagerType"
,
"ManagerType"
,
...
@@ -101,6 +111,8 @@ __all__ = [
...
@@ -101,6 +111,8 @@ __all__ = [
"TestType"
,
"TestType"
,
"CKit"
,
"CKit"
,
"ConfigConst"
,
"ConfigConst"
,
"ComType"
,
"ParserType"
,
"UserConfigManager"
,
"UserConfigManager"
,
"ResourceManager"
,
"ResourceManager"
,
"CaseResult"
,
"CaseResult"
,
...
@@ -125,9 +137,13 @@ __all__ = [
...
@@ -125,9 +137,13 @@ __all__ = [
"check_device_name"
,
"check_device_name"
,
"do_module_kit_setup"
,
"do_module_kit_setup"
,
"do_module_kit_teardown"
,
"do_module_kit_teardown"
,
"get_test_component_version"
,
"ExecInfo"
,
"ExecInfo"
,
"ResultReporter"
,
"ResultReporter"
,
"main_report"
"main_report"
,
"DeployKit"
,
"DeployToolKit"
,
"DeviceAllocationState"
]
]
...
...
src/xdevice/_core/executor/scheduler.py
浏览文件 @
79d51d85
...
@@ -1086,3 +1086,18 @@ class Scheduler(object):
...
@@ -1086,3 +1086,18 @@ class Scheduler(object):
else
:
else
:
kit_version
=
kit
.
properties
.
get
(
ConfigConst
.
version
,
None
)
kit_version
=
kit
.
properties
.
get
(
ConfigConst
.
version
,
None
)
return
kit_version
return
kit_version
@
classmethod
def
update_test_type_in_source
(
cls
,
key
,
value
):
LOG
.
debug
(
"update test type dict in source"
)
TestDictSource
.
test_type
[
key
]
=
value
@
classmethod
def
update_ext_type_in_source
(
cls
,
key
,
value
):
LOG
.
debug
(
"update ext type dict in source"
)
TestDictSource
.
exe_type
[
key
]
=
value
@
classmethod
def
_clear_test_dict_source
(
cls
):
TestDictSource
.
exe_type
.
clear
()
TestDictSource
.
test_type
.
clear
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录