Fix errors test-suite on windows
This commit is contained in:
parent
42938dc520
commit
b71eb53bae
1 changed files with 10 additions and 11 deletions
|
|
@ -15,18 +15,11 @@
|
||||||
|
|
||||||
LANGUAGE = errors
|
LANGUAGE = errors
|
||||||
ERROR_EXT = newerr
|
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@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
top_builddir = @top_builddir@
|
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 .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)))
|
ALL_ERROR_TEST_CASES := $(patsubst %.i,%, $(notdir $(wildcard $(srcdir)/*.i)))
|
||||||
CPP_ERROR_TEST_CASES := $(filter cpp_%, $(ALL_ERROR_TEST_CASES))
|
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
|
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
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
echo "$(ACTION)ing errors testcase $*"
|
echo "$(ACTION)ing errors testcase $*"
|
||||||
-$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
|
-$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
|
||||||
$(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
|
$(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
echo "$(ACTION)ing errors testcase $*"
|
echo "$(ACTION)ing errors testcase $*"
|
||||||
-$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
|
-$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
|
||||||
$(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
|
$(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT)
|
||||||
|
|
||||||
%.clean:
|
%.clean:
|
||||||
@exit 0
|
@exit 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue