From 5c997bd5dd52ecc7e57098805ac36119777c9be9 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Mon, 25 Apr 2022 17:26:29 +0800 Subject: [PATCH] ci(pytest): upgrade to 0.7.0 --- .gitlab-ci.yml | 2 +- conftest.py | 8 ++++---- tools/test_apps/system/panic/conftest.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69136e530c..4401e10dd8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ variables: TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git" CI_AUTO_TEST_SCRIPT_REPO_URL: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/auto_test_script.git" CI_AUTO_TEST_SCRIPT_REPO_BRANCH: "ci/v4.1" - PYTEST_EMBEDDED_VERSION: "0.6.0" + PYTEST_EMBEDDED_VERSION: "0.7.0" # cache python dependencies PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" diff --git a/conftest.py b/conftest.py index 374f676b48..b2730058de 100644 --- a/conftest.py +++ b/conftest.py @@ -29,7 +29,7 @@ from _pytest.python import Function from _pytest.reports import TestReport from _pytest.runner import CallInfo from _pytest.terminal import TerminalReporter -from pytest_embedded.plugin import apply_count, parse_configuration +from pytest_embedded.plugin import multi_dut_argument, multi_dut_fixture from pytest_embedded.utils import find_by_suffix SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2'] @@ -75,7 +75,7 @@ def session_tempdir() -> str: @pytest.fixture -@parse_configuration +@multi_dut_argument def config(request: FixtureRequest) -> str: return getattr(request, 'param', None) or DEFAULT_SDKCONFIG @@ -91,7 +91,7 @@ def test_case_name(request: FixtureRequest, target: str, config: str) -> str: @pytest.fixture -@apply_count +@multi_dut_fixture def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> str: """ Check local build dir with the following priority: @@ -137,7 +137,7 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st @pytest.fixture(autouse=True) -@apply_count +@multi_dut_fixture def junit_properties( test_case_name: str, record_xml_attribute: Callable[[str, object], None] ) -> None: diff --git a/tools/test_apps/system/panic/conftest.py b/tools/test_apps/system/panic/conftest.py index f1c0c6f223..fc5b0445ae 100644 --- a/tools/test_apps/system/panic/conftest.py +++ b/tools/test_apps/system/panic/conftest.py @@ -138,7 +138,7 @@ class PanicTestDut(IdfDut): """Extract the core dump from flash, run espcoredump on it""" coredump_file_name = os.path.join(self.logdir, 'coredump_data.bin') logging.info('Writing flash binary core dump to %s', coredump_file_name) - self.serial.dump_flash(coredump_file_name, partition='coredump') + self.serial.dump_flash(partition='coredump', output=coredump_file_name) output_file_name = os.path.join(self.logdir, 'coredump_flash_result.txt') self._call_espcoredump(