Fix errors test-suite on windows

This commit is contained in:
William S Fulton 2014-05-29 08:44:19 +01:00
commit b71eb53bae

View file

@ -15,18 +15,11 @@
LANGUAGE = errors
ERROR_EXT = newerr
# Portable dos2unix / todos for stripping CR
TODOS = tr -d '\r'
#TODOS = sed -e 's/\r$$//' # On OSX behaves as if written 's/r$$//'
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
# strip source directory from output, so that diffs compare
srcdir_regexp = $(shell echo $(srcdir)/ | sed 's/\./[.]/g')
STRIP_SRCDIR = sed 's|^$(srcdir_regexp)||'
# All .i files with prefix 'cpp_' will be treated as C++ input and remaining .i files as C input
ALL_ERROR_TEST_CASES := $(patsubst %.i,%, $(notdir $(wildcard $(srcdir)/*.i)))
CPP_ERROR_TEST_CASES := $(filter cpp_%, $(ALL_ERROR_TEST_CASES))
@ -37,17 +30,23 @@ ERROR_TEST_CASES := $(CPP_ERROR_TEST_CASES:=.cpptest) \
include $(srcdir)/../common.mk
# Portable dos2unix / todos for stripping CR
TODOS = tr -d '\r'
#TODOS = sed -e 's/\r$$//' # On OSX behaves as if written 's/r$$//'
# strip source directory from output, so that diffs compare
STRIP_SRCDIR = sed -e 's|\\|/|g' -e 's|^$(SRCDIR)||'
# Rules for the different types of tests
%.cpptest:
echo "$(ACTION)ing errors testcase $*"
-$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
$(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
-$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
$(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT)
%.ctest:
echo "$(ACTION)ing errors testcase $*"
-$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
$(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
-$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
$(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT)
%.clean:
@exit 0