diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d20fe98544..16c3563458 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,7 +70,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_TAG: "v0.4.5" + PYTEST_EMBEDDED_TAG: "v0.5.1" # cache python dependencies PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" diff --git a/examples/custom_bootloader/bootloader_hooks/pytest_custom_bootloader_hooks.py b/examples/custom_bootloader/bootloader_hooks/pytest_custom_bootloader_hooks.py index f66bef07af..85c70fec15 100644 --- a/examples/custom_bootloader/bootloader_hooks/pytest_custom_bootloader_hooks.py +++ b/examples/custom_bootloader/bootloader_hooks/pytest_custom_bootloader_hooks.py @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest -from pytest_embedded.dut import Dut +from pytest_embedded import Dut @pytest.mark.esp32 diff --git a/examples/custom_bootloader/bootloader_override/pytest_custom_bootloader_override.py b/examples/custom_bootloader/bootloader_override/pytest_custom_bootloader_override.py index c851f1050f..6fe2b5340e 100644 --- a/examples/custom_bootloader/bootloader_override/pytest_custom_bootloader_override.py +++ b/examples/custom_bootloader/bootloader_override/pytest_custom_bootloader_override.py @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest -from pytest_embedded.dut import Dut +from pytest_embedded import Dut from pytest_embedded_idf.app import IdfApp diff --git a/examples/peripherals/timer_group/gptimer/pytest_gptimer.py b/examples/peripherals/timer_group/gptimer/pytest_gptimer.py index 19a38c6e46..9935592430 100644 --- a/examples/peripherals/timer_group/gptimer/pytest_gptimer.py +++ b/examples/peripherals/timer_group/gptimer/pytest_gptimer.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: CC0-1.0 import pytest -from pytest_embedded.dut import Dut +from pytest_embedded import Dut @pytest.mark.supported_targets diff --git a/examples/peripherals/timer_group/legacy_driver/pytest_timer_group.py b/examples/peripherals/timer_group/legacy_driver/pytest_timer_group.py index f3658778bc..058638029d 100644 --- a/examples/peripherals/timer_group/legacy_driver/pytest_timer_group.py +++ b/examples/peripherals/timer_group/legacy_driver/pytest_timer_group.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: CC0-1.0 import pytest -from pytest_embedded.dut import Dut +from pytest_embedded import Dut @pytest.mark.supported_targets diff --git a/examples/system/console/advanced/pytest_console_advanced.py b/examples/system/console/advanced/pytest_console_advanced.py index 4018ef5a7d..0b503d29ab 100644 --- a/examples/system/console/advanced/pytest_console_advanced.py +++ b/examples/system/console/advanced/pytest_console_advanced.py @@ -1,7 +1,8 @@ -# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest +from pytest_embedded import Dut @pytest.mark.esp32 @@ -11,7 +12,7 @@ import pytest 'history', 'nohistory', ], indirect=True) -def test_console_advanced(config, dut): # type: ignore +def test_console_advanced(config: str, dut: Dut) -> None: if config == 'history': dut.expect('Command history enabled') elif config == 'nohistory': diff --git a/examples/system/console/basic/pytest_console_basic.py b/examples/system/console/basic/pytest_console_basic.py index 4018ef5a7d..0b503d29ab 100644 --- a/examples/system/console/basic/pytest_console_basic.py +++ b/examples/system/console/basic/pytest_console_basic.py @@ -1,7 +1,8 @@ -# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest +from pytest_embedded import Dut @pytest.mark.esp32 @@ -11,7 +12,7 @@ import pytest 'history', 'nohistory', ], indirect=True) -def test_console_advanced(config, dut): # type: ignore +def test_console_advanced(config: str, dut: Dut) -> None: if config == 'history': dut.expect('Command history enabled') elif config == 'nohistory': diff --git a/pytest.ini b/pytest.ini index 775c665d25..4ae83452d8 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,6 +4,7 @@ python_files = pytest_*.py # ignore PytestExperimentalApiWarning for record_xml_attribute addopts = + -s --embedded-services esp,idf -W ignore::_pytest.warning_types.PytestExperimentalApiWarning @@ -19,7 +20,6 @@ markers = all_targets: support all targets, including supported ones and preview ones # log related -log_auto_indent = True log_cli = True log_cli_level = INFO log_cli_format = %(asctime)s %(levelname)s %(message)s @@ -27,6 +27,7 @@ log_cli_date_format = %Y-%m-%d %H:%M:%S # junit related junit_family = xunit1 + ## log all to `system-out` when case fail -junit_logging = log +junit_logging = stdout junit_log_passing_tests = False