mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
test(build_system): fix buildv2 pytest coverage
Allow the reconfigure test to assert the buildv2 activation message when pytest runs with --buildv2. Make the ULP API probe use CMake-friendly forward-slash paths and an explicit ULP toolchain/custom-toolchain setting so the direct cmake configure works on Windows as well as Linux.
This commit is contained in:
@@ -72,9 +72,12 @@ def get_subdirs_absolute_paths(path: Path) -> list[str]:
|
||||
|
||||
@pytest.mark.usefixtures('test_app_copy')
|
||||
@pytest.mark.test_app_copy('examples/get-started/blink')
|
||||
def test_compile_commands_json_updated_by_reconfigure(idf_py: IdfPyFunc) -> None:
|
||||
def test_compile_commands_json_updated_by_reconfigure(idf_py: IdfPyFunc, request: pytest.FixtureRequest) -> None:
|
||||
output = idf_py('reconfigure')
|
||||
assert 'Building ESP-IDF components for target esp32' in output.stdout
|
||||
if request.config.getoption('buildv2', False):
|
||||
assert 'IDF Build System V2 (cmakev2) activated' in output.stdout
|
||||
else:
|
||||
assert 'Building ESP-IDF components for target esp32' in output.stdout
|
||||
snapshot_1 = get_snapshot(['build/compile_commands.json'])
|
||||
snapshot_2 = get_snapshot(['build/compile_commands.json'])
|
||||
snapshot_2.assert_same(snapshot_1)
|
||||
|
||||
Reference in New Issue
Block a user