mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: always cleanup idf copy in ci
This commit is contained in:
parent
b5607cf43c
commit
a4f691b88a
@ -194,8 +194,12 @@ build_clang_test_apps_esp32c6:
|
||||
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
|
||||
- cd ${IDF_PATH}/tools/test_build_system
|
||||
- python ${IDF_PATH}/tools/ci/get_known_failure_cases_file.py
|
||||
- pytest --parallel-count ${CI_NODE_TOTAL:-1} --parallel-index ${CI_NODE_INDEX:-1}
|
||||
--work-dir ${CI_PROJECT_DIR}/test_build_system --junitxml=${CI_PROJECT_DIR}/XUNIT_RESULT.xml
|
||||
- pytest
|
||||
--cleanup-idf-copy
|
||||
--parallel-count ${CI_NODE_TOTAL:-1}
|
||||
--parallel-index ${CI_NODE_INDEX:-1}
|
||||
--work-dir ${CI_PROJECT_DIR}/test_build_system
|
||||
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
|
||||
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||
|
||||
pytest_build_system:
|
||||
|
@ -31,7 +31,7 @@ def pytest_runtest_makereport(item: typing.Any, call: typing.Any) -> typing.Gene
|
||||
|
||||
def should_clean_test_dir(request: FixtureRequest) -> bool:
|
||||
# Only remove the test directory if the test has passed
|
||||
return getattr(request.node, 'passed', False)
|
||||
return getattr(request.node, 'passed', False) or request.config.getoption('cleanup_idf_copy', False)
|
||||
|
||||
|
||||
def pytest_addoption(parser: pytest.Parser) -> None:
|
||||
@ -40,6 +40,10 @@ def pytest_addoption(parser: pytest.Parser) -> None:
|
||||
help='Directory for temporary files. If not specified, an OS-specific '
|
||||
'temporary directory will be used.'
|
||||
)
|
||||
parser.addoption(
|
||||
'--cleanup-idf-copy', action='store_true',
|
||||
help='Always clean up the IDF copy after the test. By default, the copy is cleaned up only if the test passes.'
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
|
Loading…
Reference in New Issue
Block a user