Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix errors test-suite on windows

  • Loading branch information...
commit b71eb53baeb26f5052ed6da5064af6b10d0e6844 1 parent 42938dc
William S Fulton wsfulton authored
Showing with 10 additions and 11 deletions.
  1. +10 −11 Examples/test-suite/errors/Makefile.in
21 Examples/test-suite/errors/Makefile.in
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.