forked from espressif/esp-idf
feat(tools): Disable failing build system tests on Windows runner
This commit is contained in:
@@ -4,12 +4,14 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from test_build_system_helpers import EnvDict, IdfPyFunc, append_to_file, file_contains, run_cmake, run_cmake_and_build
|
from test_build_system_helpers import EnvDict, IdfPyFunc, append_to_file, file_contains, run_cmake, run_cmake_and_build
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_build_custom_cmake_project(test_app_copy: Path) -> None:
|
def test_build_custom_cmake_project(test_app_copy: Path) -> None:
|
||||||
for target in ['esp32', 'esp32s3', 'esp32c6', 'esp32h2']:
|
for target in ['esp32', 'esp32s3', 'esp32c6', 'esp32h2']:
|
||||||
logging.info(f'Test build ESP-IDF as a library to a custom CMake projects for {target}')
|
logging.info(f'Test build ESP-IDF as a library to a custom CMake projects for {target}')
|
||||||
@@ -50,6 +52,7 @@ def test_build_cmake_library_psram_strategies(idf_py: IdfPyFunc, test_app_copy:
|
|||||||
(test_app_copy / 'sdkconfig').unlink()
|
(test_app_copy / 'sdkconfig').unlink()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
@pytest.mark.usefixtures('test_app_copy')
|
@pytest.mark.usefixtures('test_app_copy')
|
||||||
@pytest.mark.usefixtures('idf_copy')
|
@pytest.mark.usefixtures('idf_copy')
|
||||||
def test_defaults_for_unspecified_idf_build_process_args(default_idf_env: EnvDict) -> None:
|
def test_defaults_for_unspecified_idf_build_process_args(default_idf_env: EnvDict) -> None:
|
||||||
|
@@ -207,6 +207,7 @@ def test_fallback_to_build_system_target(idf_py: IdfPyFunc, test_app_copy: Path)
|
|||||||
assert msg in ret.stdout, 'Custom target did not produce expected output'
|
assert msg in ret.stdout, 'Custom target did not produce expected output'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_create_component_and_project_plus_build(idf_copy: Path) -> None:
|
def test_create_component_and_project_plus_build(idf_copy: Path) -> None:
|
||||||
logging.info('Create project and component using idf.py and build it')
|
logging.info('Create project and component using idf.py and build it')
|
||||||
run_idf_py('-C', 'projects', 'create-project', 'temp_test_project', workdir=idf_copy)
|
run_idf_py('-C', 'projects', 'create-project', 'temp_test_project', workdir=idf_copy)
|
||||||
|
@@ -4,12 +4,14 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from test_build_system_helpers import EnvDict, IdfPyFunc, append_to_file, replace_in_file
|
from test_build_system_helpers import EnvDict, IdfPyFunc, append_to_file, replace_in_file
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_component_extra_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
def test_component_extra_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||||
logging.info('Setting EXTRA_COMPONENT_DIRS works')
|
logging.info('Setting EXTRA_COMPONENT_DIRS works')
|
||||||
shutil.move(test_app_copy / 'main', test_app_copy / 'different_main' / 'main')
|
shutil.move(test_app_copy / 'main', test_app_copy / 'different_main' / 'main')
|
||||||
@@ -42,6 +44,7 @@ def test_component_can_not_be_empty_dir(idf_py: IdfPyFunc, test_app_copy: Path)
|
|||||||
assert str(empty_component_dir) not in data.get('build_component_paths')
|
assert str(empty_component_dir) not in data.get('build_component_paths')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_component_subdirs_not_added_to_component_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
def test_component_subdirs_not_added_to_component_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||||
logging.info('If a component directory is added to COMPONENT_DIRS, its subdirectories are not added')
|
logging.info('If a component directory is added to COMPONENT_DIRS, its subdirectories are not added')
|
||||||
(test_app_copy / 'main' / 'test').mkdir(parents=True)
|
(test_app_copy / 'main' / 'test').mkdir(parents=True)
|
||||||
@@ -52,6 +55,7 @@ def test_component_subdirs_not_added_to_component_dirs(idf_py: IdfPyFunc, test_a
|
|||||||
assert str(test_app_copy / 'main') in data.get('build_component_paths')
|
assert str(test_app_copy / 'main') in data.get('build_component_paths')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_component_sibling_dirs_not_added_to_component_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
def test_component_sibling_dirs_not_added_to_component_dirs(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||||
logging.info('If a component directory is added to COMPONENT_DIRS, its sibling directories are not added')
|
logging.info('If a component directory is added to COMPONENT_DIRS, its sibling directories are not added')
|
||||||
mycomponents_subdir = (test_app_copy / 'mycomponents')
|
mycomponents_subdir = (test_app_copy / 'mycomponents')
|
||||||
@@ -76,6 +80,7 @@ def test_component_sibling_dirs_not_added_to_component_dirs(idf_py: IdfPyFunc, t
|
|||||||
assert str(mycomponents_subdir / 'mycomponent') in data.get('build_component_paths')
|
assert str(mycomponents_subdir / 'mycomponent') in data.get('build_component_paths')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_component_properties_are_set(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
def test_component_properties_are_set(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||||
logging.info('Component properties are set')
|
logging.info('Component properties are set')
|
||||||
append_to_file(test_app_copy / 'CMakeLists.txt', '\n'.join(['',
|
append_to_file(test_app_copy / 'CMakeLists.txt', '\n'.join(['',
|
||||||
@@ -85,6 +90,7 @@ def test_component_properties_are_set(idf_py: IdfPyFunc, test_app_copy: Path) ->
|
|||||||
assert 'SRCS:{}'.format(test_app_copy / 'main' / 'build_test_app.c') in ret.stdout, 'Component properties should be set'
|
assert 'SRCS:{}'.format(test_app_copy / 'main' / 'build_test_app.c') in ret.stdout, 'Component properties should be set'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_component_overriden_dir(idf_py: IdfPyFunc, test_app_copy: Path, default_idf_env: EnvDict) -> None:
|
def test_component_overriden_dir(idf_py: IdfPyFunc, test_app_copy: Path, default_idf_env: EnvDict) -> None:
|
||||||
logging.info('Getting component overriden dir')
|
logging.info('Getting component overriden dir')
|
||||||
(test_app_copy / 'components' / 'hal').mkdir(parents=True)
|
(test_app_copy / 'components' / 'hal').mkdir(parents=True)
|
||||||
@@ -104,6 +110,7 @@ def test_component_overriden_dir(idf_py: IdfPyFunc, test_app_copy: Path, default
|
|||||||
assert 'kconfig:{}'.format(idf_path / 'components' / 'hal') in ret.stdout, 'Failed to verify original `main` directory'
|
assert 'kconfig:{}'.format(idf_path / 'components' / 'hal') in ret.stdout, 'Failed to verify original `main` directory'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_components_prioritizer_over_extra_components_dir(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
def test_components_prioritizer_over_extra_components_dir(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||||
logging.info('Project components prioritized over EXTRA_COMPONENT_DIRS')
|
logging.info('Project components prioritized over EXTRA_COMPONENT_DIRS')
|
||||||
(test_app_copy / 'extra_dir' / 'my_component').mkdir(parents=True)
|
(test_app_copy / 'extra_dir' / 'my_component').mkdir(parents=True)
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ def test_target_from_environment_cmake(default_idf_env: EnvDict) -> None:
|
|||||||
assert file_contains('build/CMakeCache.txt', 'IDF_TARGET:STRING={}'.format(ESP32S2_TARGET))
|
assert file_contains('build/CMakeCache.txt', 'IDF_TARGET:STRING={}'.format(ESP32S2_TARGET))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_target_from_environment_idf_py(idf_py: IdfPyFunc, default_idf_env: EnvDict, test_app_copy: Path) -> None:
|
def test_target_from_environment_idf_py(idf_py: IdfPyFunc, default_idf_env: EnvDict, test_app_copy: Path) -> None:
|
||||||
def reconfigure_and_check_return_values(errmsg: str, opts: Optional[List[str]] = None) -> None:
|
def reconfigure_and_check_return_values(errmsg: str, opts: Optional[List[str]] = None) -> None:
|
||||||
opts = opts or []
|
opts = opts or []
|
||||||
@@ -72,6 +74,7 @@ def test_target_from_environment_idf_py(idf_py: IdfPyFunc, default_idf_env: EnvD
|
|||||||
['-D', 'IDF_TARGET={}'.format(ESP32_TARGET)])
|
['-D', 'IDF_TARGET={}'.format(ESP32_TARGET)])
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
def test_target_consistency_cmake(default_idf_env: EnvDict, test_app_copy: Path) -> None:
|
def test_target_consistency_cmake(default_idf_env: EnvDict, test_app_copy: Path) -> None:
|
||||||
def reconfigure_and_check_return_values(errmsg: str, opts: Optional[List[str]] = None) -> None:
|
def reconfigure_and_check_return_values(errmsg: str, opts: Optional[List[str]] = None) -> None:
|
||||||
opts = opts or []
|
opts = opts or []
|
||||||
|
@@ -20,6 +20,7 @@ def clean_app_dir(app_path: Path) -> None:
|
|||||||
shutil.rmtree(app_path / 'build', ignore_errors=True)
|
shutil.rmtree(app_path / 'build', ignore_errors=True)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
@pytest.mark.idf_copy('esp idf with spaces')
|
@pytest.mark.idf_copy('esp idf with spaces')
|
||||||
def test_spaces_bundle1(idf_copy: Path) -> None:
|
def test_spaces_bundle1(idf_copy: Path) -> None:
|
||||||
logging.info('Running test spaces bundle 1')
|
logging.info('Running test spaces bundle 1')
|
||||||
@@ -33,6 +34,7 @@ def test_spaces_bundle1(idf_copy: Path) -> None:
|
|||||||
run_idf_py('build', workdir=(idf_copy / 'examples' / 'storage' / 'spiffsgen'))
|
run_idf_py('build', workdir=(idf_copy / 'examples' / 'storage' / 'spiffsgen'))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
@pytest.mark.idf_copy('esp idf with spaces')
|
@pytest.mark.idf_copy('esp idf with spaces')
|
||||||
def test_spaces_bundle2(idf_copy: Path) -> None:
|
def test_spaces_bundle2(idf_copy: Path) -> None:
|
||||||
logging.info('Running test spaces bundle 2')
|
logging.info('Running test spaces bundle 2')
|
||||||
@@ -48,6 +50,7 @@ def test_spaces_bundle2(idf_copy: Path) -> None:
|
|||||||
run_idf_py('uf2', workdir=hello_world_app_path)
|
run_idf_py('uf2', workdir=hello_world_app_path)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
@pytest.mark.idf_copy('esp idf with spaces')
|
@pytest.mark.idf_copy('esp idf with spaces')
|
||||||
def test_spaces_bundle3(idf_copy: Path) -> None:
|
def test_spaces_bundle3(idf_copy: Path) -> None:
|
||||||
logging.info('Running test spaces bundle 3')
|
logging.info('Running test spaces bundle 3')
|
||||||
@@ -86,6 +89,7 @@ def test_install_export_unix(idf_copy: Path) -> None:
|
|||||||
subprocess.check_call(export_cmd, env=env, shell=True, cwd=idf_copy, executable='/bin/bash')
|
subprocess.check_call(export_cmd, env=env, shell=True, cwd=idf_copy, executable='/bin/bash')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.platform == 'win32', reason='Failing on Windows runner. TODO')
|
||||||
@pytest.mark.skipif(sys.platform != 'win32', reason='Windows test')
|
@pytest.mark.skipif(sys.platform != 'win32', reason='Windows test')
|
||||||
@pytest.mark.idf_copy('esp idf with spaces')
|
@pytest.mark.idf_copy('esp idf with spaces')
|
||||||
def test_install_export_win(idf_copy: Path) -> None:
|
def test_install_export_win(idf_copy: Path) -> None:
|
||||||
|
Reference in New Issue
Block a user