ci: use pytest-embedded 0.5.1

This commit is contained in:
Fu Hanxi 2022-01-20 17:39:30 +08:00
parent ea4673a3a2
commit 90f8d27985
8 changed files with 16 additions and 13 deletions

View File

@ -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" 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_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" CI_AUTO_TEST_SCRIPT_REPO_BRANCH: "ci/v4.1"
PYTEST_EMBEDDED_TAG: "v0.4.5" PYTEST_EMBEDDED_TAG: "v0.5.1"
# cache python dependencies # cache python dependencies
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

View File

@ -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 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded.dut import Dut from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32

View File

@ -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 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded.dut import Dut from pytest_embedded import Dut
from pytest_embedded_idf.app import IdfApp from pytest_embedded_idf.app import IdfApp

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded.dut import Dut from pytest_embedded import Dut
@pytest.mark.supported_targets @pytest.mark.supported_targets

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded.dut import Dut from pytest_embedded import Dut
@pytest.mark.supported_targets @pytest.mark.supported_targets

View File

@ -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 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@ -11,7 +12,7 @@ import pytest
'history', 'history',
'nohistory', 'nohistory',
], indirect=True) ], indirect=True)
def test_console_advanced(config, dut): # type: ignore def test_console_advanced(config: str, dut: Dut) -> None:
if config == 'history': if config == 'history':
dut.expect('Command history enabled') dut.expect('Command history enabled')
elif config == 'nohistory': elif config == 'nohistory':

View File

@ -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 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@ -11,7 +12,7 @@ import pytest
'history', 'history',
'nohistory', 'nohistory',
], indirect=True) ], indirect=True)
def test_console_advanced(config, dut): # type: ignore def test_console_advanced(config: str, dut: Dut) -> None:
if config == 'history': if config == 'history':
dut.expect('Command history enabled') dut.expect('Command history enabled')
elif config == 'nohistory': elif config == 'nohistory':

View File

@ -4,6 +4,7 @@ python_files = pytest_*.py
# ignore PytestExperimentalApiWarning for record_xml_attribute # ignore PytestExperimentalApiWarning for record_xml_attribute
addopts = addopts =
-s
--embedded-services esp,idf --embedded-services esp,idf
-W ignore::_pytest.warning_types.PytestExperimentalApiWarning -W ignore::_pytest.warning_types.PytestExperimentalApiWarning
@ -19,7 +20,6 @@ markers =
all_targets: support all targets, including supported ones and preview ones all_targets: support all targets, including supported ones and preview ones
# log related # log related
log_auto_indent = True
log_cli = True log_cli = True
log_cli_level = INFO log_cli_level = INFO
log_cli_format = %(asctime)s %(levelname)s %(message)s 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 related
junit_family = xunit1 junit_family = xunit1
## log all to `system-out` when case fail ## log all to `system-out` when case fail
junit_logging = log junit_logging = stdout
junit_log_passing_tests = False junit_log_passing_tests = False