]> FriiDump Source - friidump.git/blob - build_msvc32_native_report_tests.cmd
FriiDump 0.5.3.16: finalize release identity and documentation
[friidump.git] / build_msvc32_native_report_tests.cmd
1 @echo off
2 setlocal EnableExtensions
3 cd /d "%~dp0"
4
5 if not exist "build-msvc32" mkdir "build-msvc32"
6 if exist "friidump-report-fixtures.exe" del /q "friidump-report-fixtures.exe"
7 if exist "build-msvc32\report-fixtures" rmdir /s /q "build-msvc32\report-fixtures"
8 mkdir "build-msvc32\report-fixtures"
9
10 call "%~dp0.vscode\msvc32.cmd" cl @"%~dp0msvc32_native_report_tests.rsp" /link ole32.lib
11 if errorlevel 1 exit /b %ERRORLEVEL%
12
13 "%~dp0friidump-report-fixtures.exe" "%~dp0build-msvc32\report-fixtures"
14 if errorlevel 1 exit /b %ERRORLEVEL%
15
16 powershell -NoProfile -ExecutionPolicy Bypass -Command "$files = Get-ChildItem -LiteralPath '%~dp0build-msvc32\report-fixtures' -Recurse -Filter '*.friidump.json'; if ($files.Count -lt 9) { throw 'Expected at least 9 native-report fixtures.' }; $files | ForEach-Object { $null = Get-Content -Raw -LiteralPath $_.FullName | ConvertFrom-Json }; Write-Host ('MSVC native-report fixtures: PASS (' + $files.Count + ')')"
17 if errorlevel 1 exit /b %ERRORLEVEL%
18
19 where py >nul 2>nul
20 if not errorlevel 1 (
21   py -3 "%~dp0tests\validate_native_reports.py" --fixtures "%~dp0build-msvc32\report-fixtures" --schema "%~dp0tests\contracts\friidump-test-result.v1.schema.json"
22   if errorlevel 1 (
23     echo [ERROR] Strict Python fixture validation failed. Install jsonschema with: py -3 -m pip install jsonschema
24     exit /b %ERRORLEVEL%
25   )
26 ) else (
27   echo [WARN] Python launcher not found; strict JSON Schema validation was not run on Windows.
28 )
29
30 exit /b 0