mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: skip building pytest apps in normal find_apps build_apps
This commit is contained in:
parent
153433d47d
commit
b91f8fb4eb
@ -142,6 +142,7 @@ check_esp_err_to_name:
|
|||||||
scan_tests:
|
scan_tests:
|
||||||
extends:
|
extends:
|
||||||
- .pre_check_base_template
|
- .pre_check_base_template
|
||||||
|
- .before_script_pytest
|
||||||
- .rules:build:target_test
|
- .rules:build:target_test
|
||||||
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
|
image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
|
||||||
tags:
|
tags:
|
||||||
|
@ -5,12 +5,9 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
try:
|
from ci.idf_ci_utils import get_pytest_app_paths
|
||||||
from typing import Any
|
|
||||||
except ImportError:
|
|
||||||
# Only used for type annotations
|
|
||||||
pass
|
|
||||||
from find_apps import find_apps
|
from find_apps import find_apps
|
||||||
from find_build_apps import BUILD_SYSTEM_CMAKE, BUILD_SYSTEMS
|
from find_build_apps import BUILD_SYSTEM_CMAKE, BUILD_SYSTEMS
|
||||||
from idf_py_actions.constants import PREVIEW_TARGETS, SUPPORTED_TARGETS
|
from idf_py_actions.constants import PREVIEW_TARGETS, SUPPORTED_TARGETS
|
||||||
@ -174,8 +171,16 @@ def main(): # type: () -> None
|
|||||||
scan_info_dict[target]['standalone_apps'] = set()
|
scan_info_dict[target]['standalone_apps'] = set()
|
||||||
test_case_apps_preserve_default = True if build_system == 'cmake' else False
|
test_case_apps_preserve_default = True if build_system == 'cmake' else False
|
||||||
for target in SUPPORTED_TARGETS:
|
for target in SUPPORTED_TARGETS:
|
||||||
|
# get pytest apps paths
|
||||||
|
pytest_app_paths = set()
|
||||||
|
for path in paths:
|
||||||
|
pytest_app_paths.update(get_pytest_app_paths(path, target))
|
||||||
|
|
||||||
apps = []
|
apps = []
|
||||||
for app_dir in scan_info_dict[target]['test_case_apps']:
|
for app_dir in scan_info_dict[target]['test_case_apps']:
|
||||||
|
if app_dir in pytest_app_paths:
|
||||||
|
print(f'WARNING: has pytest script: {app_dir}')
|
||||||
|
continue
|
||||||
apps.append({
|
apps.append({
|
||||||
'app_dir': app_dir,
|
'app_dir': app_dir,
|
||||||
'build_system': args.build_system,
|
'build_system': args.build_system,
|
||||||
@ -183,6 +188,9 @@ def main(): # type: () -> None
|
|||||||
'preserve': args.preserve_all or test_case_apps_preserve_default
|
'preserve': args.preserve_all or test_case_apps_preserve_default
|
||||||
})
|
})
|
||||||
for app_dir in scan_info_dict[target]['standalone_apps']:
|
for app_dir in scan_info_dict[target]['standalone_apps']:
|
||||||
|
if app_dir in pytest_app_paths:
|
||||||
|
print(f'Skipping pytest app: {app_dir}')
|
||||||
|
continue
|
||||||
apps.append({
|
apps.append({
|
||||||
'app_dir': app_dir,
|
'app_dir': app_dir,
|
||||||
'build_system': args.build_system,
|
'build_system': args.build_system,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user