提交 91c9a500 编写于 作者: O openharmony_ci 提交者: Gitee

!27 适配对外接口使得developertest支持lite设备的TDD测试

Merge pull request !27 from zhangchunbao/master
...@@ -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.ZUnitRunner {junit_para}{arg_list}" \ "ohos.testkit.runner.JUnitRunner {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,9 +1386,9 @@ class RemoteDexRunner: ...@@ -1385,9 +1386,9 @@ 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.ZUnitRunner {arg_list} " \ "ohos.testkit.runner.JUnitRunner {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,
...@@ -1396,7 +1397,7 @@ class RemoteDexRunner: ...@@ -1396,7 +1397,7 @@ class RemoteDexRunner:
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()):
......
...@@ -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"
] ]
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册