From 502c93bfd5683098dd818f5b5a13f66972d91860 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 16 Feb 2016 21:16:00 +0100 Subject: [PATCH] Fix scrutiny out/expected comparison in tests on Mingw w/o MSYS It turns out that "fc", Microsoft's pathetic excuse for a file comparison tool, only reads in a fixed number of lines when comparing files (100 by default). If that number is exceeded, it just stops and reports there were differences, even though there are only newline differences, even when whitespace is ignored. So we just increase the buffer size and hope for the best. --- tests/runtests.bat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/runtests.bat b/tests/runtests.bat index be587d4..28ba4c8 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -12,6 +12,8 @@ set FAST_OPTIONS=-O5 -d0 -b -disable-interrupts set PATH=%cd%\..;%PATH% set TYPESDB=..\types.db +rem Increase this when tests start failing on "inexplicable" diffs +set FCBUFSIZE=500 set compile=..\csc -types %TYPESDB% -ignore-repository -compiler %CHICKEN% -v -I%TEST_DIR%/.. -L%TEST_DIR%/.. -include-path %TEST_DIR%/.. -o a.out set compile2=..\csc -compiler %CHICKEN% -v -I%TEST_DIR%/.. -L%TEST_DIR%/.. -include-path %TEST_DIR%/.. @@ -47,14 +49,14 @@ if errorlevel 1 exit /b 1 rem this is sensitive to gensym-names, so make it optional if not exist scrutiny.expected copy /Y scrutiny.out scrutiny.expected -fc /w scrutiny.expected scrutiny.out +fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.out if errorlevel 1 exit /b 1 %compile% scrutiny-tests-2.scm -A -scrutinize -analyze-only -verbose 2>scrutiny-2.out if errorlevel 1 exit /b 1 if not exist scrutiny-2.expected copy /Y scrutiny-2.out scrutiny-2.expected -fc /w scrutiny-2.expected scrutiny-2.out +fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.out if errorlevel 1 exit /b 1 %compile% scrutiny-tests-3.scm -specialize -block @@ -138,13 +140,13 @@ if errorlevel 1 exit /b 1 echo ======================================== dynamic-wind tests ... %interpret% -s dwindtst.scm >dwindtst.out if errorlevel 1 exit /b 1 -fc /w dwindtst.expected dwindtst.out +fc /lb%FCBUFSIZE% /w dwindtst.expected dwindtst.out if errorlevel 1 exit /b 1 %compile% dwindtst.scm if errorlevel 1 exit /b 1 a.out >dwindtst.out if errorlevel 1 exit /b 1 -fc /w dwindtst.expected dwindtst.out +fc /lb%FCBUFSIZE% /w dwindtst.expected dwindtst.out if errorlevel 1 exit /b 1 echo *** Skipping "feeley-dynwind" for now *** rem %interpret% -s feeley-dynwind.scm -- 2.1.4