diff --git a/setting/globalconfig.ini b/setting/globalconfig.ini index e6159425..3c71c0ef 100644 --- a/setting/globalconfig.ini +++ b/setting/globalconfig.ini @@ -56,7 +56,7 @@ CLEAN_ALL = yes ;检查测试机分辨率, 比如:1920x1080, 多个分辨率检查用英文逗号连接。 ;no: 表示不做分辨率校验 -RESOLUTION = 1920x1080, 1080x1920, 3840x1080 +RESOLUTION = 1920x1080, 1080x1920, 3840x1080, 1024x768 ;不跳过用例,csv文件里面标记了 skip-xxx的用例不跳过 NOSKIP = no diff --git a/src/assert_common.py b/src/assert_common.py index 2d62ef02..c74966b1 100644 --- a/src/assert_common.py +++ b/src/assert_common.py @@ -187,7 +187,7 @@ def assert_file_not_exist(widget, file=None, recursive=False): def assert_element_exist(expr): """ 期望元素存在 - :param expr: 匹配元素的格式, 例如: $//dde-file-manager//1.txt + :param expr: 匹配元素的格式, 例如: $/dde-file-manager//1.txt """ sleep(0.5) logger.info(f"断言元素存在<{expr}>") diff --git a/src/rtk/local_runner.py b/src/rtk/local_runner.py index 8de1b8a6..60f607af 100644 --- a/src/rtk/local_runner.py +++ b/src/rtk/local_runner.py @@ -34,7 +34,6 @@ from src import logger from src.rtk._base import Args, write_json -from src.requestx import RequestX from src.rtk._base import transform_app_name environ["DISPLAY"] = ":0" @@ -284,14 +283,14 @@ def create_pytest_cmd(self, app_dir, default=None, proj_path=None): ): self.make_allure_report(cmd, GlobalConfig.ReportFormat.ALLURE, proj_path) # xml - if GlobalConfig.ReportFormat.XML in report_formats: - self.make_xml_report( - app_dir, - default.get(Args.case_file.value), - cmd, - GlobalConfig.ReportFormat.XML, - proj_path, - ) + # if GlobalConfig.ReportFormat.XML in report_formats: + # self.make_xml_report( + # app_dir, + # default.get(Args.case_file.value), + # cmd, + # GlobalConfig.ReportFormat.XML, + # proj_path, + # ) # json if (GlobalConfig.ReportFormat.ALLURE not in report_formats) and ( GlobalConfig.ReportFormat.JSON in report_formats diff --git a/src/rtk/remote_runner.py b/src/rtk/remote_runner.py index 3c45c6b1..cc91b9a9 100644 --- a/src/rtk/remote_runner.py +++ b/src/rtk/remote_runner.py @@ -121,12 +121,12 @@ def __init__( ) self.strf_time = strftime("%m%d%p%I%M%S") self.server_detail_json_path = f"{GlobalConfig.REPORT_PATH}/json/{self.strf_time}_remote" - self.client_xml_report_path = ( - lambda - x: f"/home/{x}/{self.server_project_path}/{GlobalConfig.report_cfg.get('XML_REPORT_PATH', default='report')}/xml".replace( - "//", "/" - ) - ) + # self.client_xml_report_path = ( + # lambda + # x: f"/home/{x}/{self.server_project_path}/{GlobalConfig.report_cfg.get('XML_REPORT_PATH', default='report')}/xml".replace( + # "//", "/" + # ) + # ) self.client_list = list(self.default.get(Args.clients.value).keys()) _pty = "t" if len(self.client_list) >= 2: @@ -195,15 +195,20 @@ def send_code_to_client(self, user, _ip, password): continue if app_name.replace("-", "_") != i: exclude += f"--exclude='{i}' " - system( + status = system( f"{self.rsync % (password,)} {exclude} {GlobalConfig.ROOT_DIR}/* " f"{user}@{_ip}:~/{self.server_project_path}/ {self.empty}" ) - system( + self.set_youqu_run_exitcode(status) + status = system( f"{self.rsync % (password,)} {exclude} {GlobalConfig.ROOT_DIR}/.env " f"{user}@{_ip}:~/{self.server_project_path}/ {self.empty}" ) - logger.info(f"代码发送成功 - < {user}@{_ip} >") + self.set_youqu_run_exitcode(status) + if status != 0: + logger.error(f"代码发送失败 - < {user}@{_ip} >") + else: + logger.info(f"代码发送成功 - < {user}@{_ip} >") def build_client_env(self, user, _ip, password): """