mirror of
https://github.com/openharmony/test_xdevice.git
synced 2026-07-18 08:46:16 -04:00
support lite tdd test
Signed-off-by: zhangchunbao <zhangchunbao515@163.com>
This commit is contained in:
@@ -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()):
|
||||
|
||||
+17
-1
@@ -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"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user