diff --git a/shared/test.makefile b/shared/test.makefile index 314704a..6e1deff 100644 --- a/shared/test.makefile +++ b/shared/test.makefile @@ -1,4 +1,5 @@ -CMP = cmp +# Do not use cmp because MinGW cmp does not ignore DOS CR-LF diffs. +CMP = diff -qa --strip-trailing-cr # Default for VALGRIND is empty unless overridden by a command-line argument. # This protects against cruft in the environment. @@ -22,7 +23,10 @@ GELIBPFX= GEBINPFX= endif -AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} AWKLIBPATH=../.libs:`$(GAWKPROG) 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` PATH=$(GEBINPFX)$$PATH LD_LIBRARY_PATH=$(GELIBPFX)$$LD_LIBRARY_PATH DYLD_LIBRARY_PATH=$(GELIBPFX)$$DYLD_LIBRARY_PATH $(VALGRIND) $(GAWKPROG) +# MSYS bash converts colons to semi-colons, which mucks up the path, +# so try to protect by replacing ":/" with "//" +# in the AWKLIBPATH value. +AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} AWKLIBPATH=../.libs$(PATH_SEPARATOR)`$(GAWKPROG) 'BEGIN {print gensub(/\<([[:alpha:]]):\//, "/\\\1/", "g", ENVIRON["AWKLIBPATH"])}'` PATH=$(GEBINPFX)$$PATH LD_LIBRARY_PATH=$(GELIBPFX)$$LD_LIBRARY_PATH DYLD_LIBRARY_PATH=$(GELIBPFX)$$DYLD_LIBRARY_PATH $(VALGRIND) $(GAWKPROG) # An attempt to print something that can be grepped for in build logs pass-fail: @@ -44,7 +48,7 @@ diffout: diff -c $(srcdir)/$${i#_}.ok $$i ; \ fi ; \ fi ; \ - done | more + done # convenient way to scan valgrind results for errors valgrind-scan: