ci: ignore collect import error on CI with env var

This commit is contained in:
Fu Hanxi
2024-05-23 13:51:31 +02:00
committed by Sudeep Mohanty
parent 50460d3483
commit 61559dc3e4
2 changed files with 3 additions and 1 deletions

View File

@@ -365,6 +365,8 @@ test_pytest_macos:
- "**/build*/build_log.txt" - "**/build*/build_log.txt"
reports: reports:
junit: XUNIT_RESULT.xml junit: XUNIT_RESULT.xml
variables:
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
script: script:
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -vv - run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -vv
--target linux --target linux

View File

@@ -141,7 +141,7 @@ class IdfPytestEmbedded:
def pytest_collectstart(self) -> None: def pytest_collectstart(self) -> None:
# mock the optional packages while collecting locally # mock the optional packages while collecting locally
if not os.getenv('CI_JOB_ID'): if not os.getenv('CI_JOB_ID') or os.getenv('PYTEST_IGNORE_COLLECT_IMPORT_ERROR') == '1':
# optional packages required by test scripts # optional packages required by test scripts
for p in [ for p in [
'scapy', 'scapy',