diff --git a/extension/src/xdevice_extension/_core/driver/drivers.py b/extension/src/xdevice_extension/_core/driver/drivers.py index f9d6b06882adeb098b5d483b55c9f25d4b6d20b8..14532c55c1f08f42238298e3d2c829716a9408c2 100644 --- a/extension/src/xdevice_extension/_core/driver/drivers.py +++ b/extension/src/xdevice_extension/_core/driver/drivers.py @@ -1350,12 +1350,13 @@ class RemoteDexRunner: command = "export BOOTCLASSPATH=$BOOTCLASSPATH:" \ "{remote_path}/{module_name};cd {remote_path}; " \ "app_process -cp {remote_path}/{module_name} / " \ - "ohos.testkit.runner.ZUnitRunner {junit_para}{arg_list}" \ - " --rawLog true --coverage false --debug false " \ + "ohos.testkit.runner.JUnitRunner {junit_para}{arg_list}" \ + " --rawLog true --coverage false " \ "--classpathToScan {remote_path}/{module_name}".format( - remote_path=self.config.remote_path, - module_name=self.config.module_name, - junit_para=self.junit_para, arg_list=self.get_args_command()) + remote_path=self.config.remote_path, + module_name=self.config.module_name, + junit_para=self.junit_para, + arg_list=self.get_args_command()) try: self.config.device.execute_shell_command( @@ -1385,18 +1386,18 @@ class RemoteDexRunner: command = "export BOOTCLASSPATH=$BOOTCLASSPATH:" \ "{remote_path}/{module_name};cd {remote_path}; " \ "app_process -cp {remote_path}/{module_name} / " \ - "ohos.testkit.runner.ZUnitRunner {arg_list} " \ + "ohos.testkit.runner.JUnitRunner {arg_list} " \ "--rawLog true --coverage false " \ - "--debug false --classpathToScan " \ + "--classpathToScan " \ "{remote_path}/{module_name}".format( - remote_path=self.config.remote_path, - module_name=self.config.module_name, - arg_list=self.get_args_command()) + remote_path=self.config.remote_path, + module_name=self.config.module_name, + arg_list=self.get_args_command()) self.config.device.execute_shell_command( command, timeout=self.config.timeout, receiver=handler, retry=0) - except ShellCommandUnresponsiveException: + except ShellCommandUnresponsiveException as _: LOG.debug("Exception: ShellCommandUnresponsiveException") finally: if not len(test_tracker.get_current_run_results()): diff --git a/src/xdevice/__init__.py b/src/xdevice/__init__.py index eff8f4ff5ed18ee4477e4d1ed5971f579af688a5..f32ed99b71eecc17d6d9728c8d5a63fc80b1cc6e 100755 --- a/src/xdevice/__init__.py +++ b/src/xdevice/__init__.py @@ -36,6 +36,8 @@ from _core.exception import DeviceError from _core.exception import LiteDeviceError from _core.exception import ExecuteTerminate from _core.exception import ReportException +from _core.exception import LiteDeviceExecuteCommandError +from _core.exception import LiteDeviceConnectError from _core.constants import DeviceTestType from _core.constants import DeviceLabelType from _core.constants import ManagerType @@ -44,6 +46,8 @@ from _core.constants import ProductForm from _core.constants import TestType from _core.constants import CKit 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.resource_manager import ResourceManager from _core.executor.listener import CaseResult @@ -63,6 +67,7 @@ from _core.utils import exec_cmd from _core.utils import check_device_name from _core.utils import do_module_kit_setup 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 EnvironmentManager from _core.executor.scheduler import Scheduler @@ -72,6 +77,9 @@ from _core.report.reporter_helper import ExecInfo from _core.report.result_reporter import ResultReporter from _core.report.__main__ import main_report 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__ = [ "Variables", @@ -93,6 +101,8 @@ __all__ = [ "LiteDeviceError", "ExecuteTerminate", "ReportException", + "LiteDeviceExecuteCommandError", + "LiteDeviceConnectError", "DeviceTestType", "DeviceLabelType", "ManagerType", @@ -101,6 +111,8 @@ __all__ = [ "TestType", "CKit", "ConfigConst", + "ComType", + "ParserType", "UserConfigManager", "ResourceManager", "CaseResult", @@ -125,9 +137,13 @@ __all__ = [ "check_device_name", "do_module_kit_setup", "do_module_kit_teardown", + "get_test_component_version", "ExecInfo", "ResultReporter", - "main_report" + "main_report", + "DeployKit", + "DeployToolKit", + "DeviceAllocationState" ] diff --git a/src/xdevice/_core/executor/scheduler.py b/src/xdevice/_core/executor/scheduler.py index 22deb97d414c890e1e6f71356e24c1a69d6933b6..1215732a2b3feb0a6487566d9e90b520e16801fd 100644 --- a/src/xdevice/_core/executor/scheduler.py +++ b/src/xdevice/_core/executor/scheduler.py @@ -1086,3 +1086,18 @@ class Scheduler(object): else: kit_version = kit.properties.get(ConfigConst.version, None) 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()