mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
ci: skip app downloader for host test cases
This commit is contained in:
@@ -300,13 +300,11 @@ test_pytest_qemu:
|
||||
- run_cmd idf-ci build run
|
||||
--build-system cmake
|
||||
--target $IDF_TARGET
|
||||
--only-test-related
|
||||
-m qemu
|
||||
--modified-files ${MR_MODIFIED_FILES}
|
||||
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||
- run_cmd pytest
|
||||
--target $IDF_TARGET
|
||||
--log-cli-level DEBUG
|
||||
-m qemu
|
||||
--embedded-services idf,qemu
|
||||
--junitxml=XUNIT_RESULT.xml
|
||||
|
12
conftest.py
12
conftest.py
@@ -300,13 +300,19 @@ def build_dir(
|
||||
"""
|
||||
# download from minio on CI
|
||||
case: PytestCase = request.node.stash[IDF_CI_PYTEST_CASE_KEY]
|
||||
if app_downloader:
|
||||
if 'skip_app_downloader' in case.all_markers:
|
||||
logging.debug('skip_app_downloader marker found, skip downloading app')
|
||||
downloader = None
|
||||
else:
|
||||
downloader = app_downloader
|
||||
|
||||
if downloader:
|
||||
# somehow hardcoded...
|
||||
app_build_path = os.path.join(idf_relpath(app_path), f'build_{target}_{config}')
|
||||
if requires_elf_or_map(case):
|
||||
app_downloader.download_app(app_build_path)
|
||||
downloader.download_app(app_build_path)
|
||||
else:
|
||||
app_downloader.download_app(app_build_path, 'flash')
|
||||
downloader.download_app(app_build_path, 'flash')
|
||||
check_dirs = [f'build_{target}_{config}']
|
||||
else:
|
||||
check_dirs = []
|
||||
|
@@ -39,6 +39,7 @@ junit_log_passing_tests = False
|
||||
markers =
|
||||
temp_skip_ci: mark test to be skipped in CI
|
||||
temp_skip: mark test to be skipped in CI and locally
|
||||
skip_app_downloader: mark test required apps built locally, not downloaded from CI
|
||||
require_elf: mark test to be skipped if no elf file is found
|
||||
|
||||
env_markers =
|
||||
|
@@ -150,6 +150,9 @@ class IdfLocalPlugin:
|
||||
if 'esp32c2' in case.targets and 'xtal_26mhz' not in case.all_markers:
|
||||
item.add_marker('xtal_40mhz')
|
||||
|
||||
if 'host_test' in case.all_markers:
|
||||
item.add_marker('skip_app_downloader') # host_test jobs will build the apps itself
|
||||
|
||||
def pytest_custom_test_case_name(self, item: Function) -> str:
|
||||
return item.funcargs.get('test_case_name', item.nodeid) # type: ignore
|
||||
|
||||
|
Reference in New Issue
Block a user