~ chicken-core (chicken-5) 2f7d7f2cd8c231a7eb061421b132771c9911078d
commit 2f7d7f2cd8c231a7eb061421b132771c9911078d
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Tue Feb 16 21:16:00 2016 +0100
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Wed Feb 17 12:12:19 2016 +1300
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.
Signed-off-by: Evan Hanson <evhan@foldling.org>
diff --git a/tests/runtests.bat b/tests/runtests.bat
index be587d49..28ba4c88 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
Trap