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:
Renz Bagaporo
2026-07-29 13:08:23 +09:00
parent c925f6bcc6
commit dc813d91ea
2 changed files with 18 additions and 8 deletions
+5 -2
View File
@@ -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)