fixes to use parallel make when running the examples and test-suite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9875 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bbd80cfa84
commit
e4bade15f3
22 changed files with 187 additions and 154 deletions
|
|
@ -1,6 +1,15 @@
|
||||||
Version 1.3.32 (in progress)
|
Version 1.3.32 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
07/24/2007: wsfulton
|
||||||
|
Parallel make support added for the examples and test-suite for developers who have
|
||||||
|
more than one CPU. Now parallel make can be used for checking in addition to building
|
||||||
|
the SWIG executable. Some typical checking examples:
|
||||||
|
|
||||||
|
make -j8 -k check
|
||||||
|
make -j4 check-java-test-suite
|
||||||
|
make -j2 check-java-examples
|
||||||
|
|
||||||
07/19/2007: mgossage
|
07/19/2007: mgossage
|
||||||
Fixed bug that stopped configure working on mingw (applied dos2unix to configure.in)
|
Fixed bug that stopped configure working on mingw (applied dos2unix to configure.in)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,18 +137,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,18 @@ CPP_TEST_CASES =
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -30,32 +30,32 @@ SWIGOPT += -nounit
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
||||||
$(MAKE) $*.cppproxy; ) \
|
$(MAKE) $*.cppproxy; ) \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
+if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
||||||
$(MAKE) $*.cproxy; ) \
|
$(MAKE) $*.cproxy; ) \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then ( \
|
||||||
$(MAKE) $*.multiproxy; ) \
|
$(MAKE) $*.multiproxy; ) \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
%.externaltest:
|
%.externaltest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_external); ) && \
|
$(swig_and_compile_external)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
@ -70,22 +70,22 @@ run_testcase = \
|
||||||
%.cppproxy: SWIGOPT += -proxy
|
%.cppproxy: SWIGOPT += -proxy
|
||||||
%.cppproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
%.cppproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
||||||
%.cppproxy:
|
%.cppproxy:
|
||||||
echo "Checking testcase $* (with run test) under chicken with -proxy"; \
|
echo "Checking testcase $* (with run test) under chicken with -proxy"
|
||||||
($(swig_and_compile_cpp); ) && \
|
$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.cproxy: SWIGOPT += -proxy
|
%.cproxy: SWIGOPT += -proxy
|
||||||
%.cproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
%.cproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
||||||
%.cproxy:
|
%.cproxy:
|
||||||
echo "Checking testcase $* (with run test) under chicken with -proxy"; \
|
echo "Checking testcase $* (with run test) under chicken with -proxy"
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multiproxy: SWIGOPT += -proxy -noclosuses
|
%.multiproxy: SWIGOPT += -proxy -noclosuses
|
||||||
%.multiproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
%.multiproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
|
||||||
%.multiproxy:
|
%.multiproxy:
|
||||||
echo "Checking testcase $* (with run test) under chicken with -proxy"; \
|
echo "Checking testcase $* (with run test) under chicken with -proxy"
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Clean
|
# Clean
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,18 @@ CPP_TEST_CASES =
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -30,19 +30,19 @@ SWIGOPT += -namespace $*Namespace $(SWIGOPTSPECIAL)
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $* && $(swig_and_compile_cpp); ) && \
|
+(cd $* && $(swig_and_compile_cpp))
|
||||||
$(run_testcase)
|
+$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $* && $(swig_and_compile_c); ) && \
|
+(cd $* && $(swig_and_compile_c))
|
||||||
$(run_testcase)
|
+$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $* && $(swig_and_compile_multi_cpp); ) && \
|
+(cd $* && $(swig_and_compile_multi_cpp))
|
||||||
$(run_testcase)
|
+$(run_testcase)
|
||||||
|
|
||||||
# Rules for custom tests
|
# Rules for custom tests
|
||||||
intermediary_classname.customtest:
|
intermediary_classname.customtest:
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# override the default in common.mk by adding SWIGOPT +=
|
# override the default in common.mk by adding SWIGOPT +=
|
||||||
|
|
@ -43,8 +43,8 @@ swig_and_compile_multi_cpp = \
|
||||||
done
|
done
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ swig_and_compile_multi_cpp = \
|
||||||
done
|
done
|
||||||
|
|
||||||
%.externaltest:
|
%.externaltest:
|
||||||
$(local_setup) \
|
$(local_setup)
|
||||||
($(swig_and_compile_external); ) && \
|
$(swig_and_compile_external)
|
||||||
$(local_run_testcase)
|
$(local_run_testcase)
|
||||||
|
|
||||||
# Same as setup and run_testcase, but without the SCRIPTPREFIX (so the runme comes from the guilescm directory)
|
# Same as setup and run_testcase, but without the SCRIPTPREFIX (so the runme comes from the guilescm directory)
|
||||||
|
|
|
||||||
|
|
@ -37,18 +37,18 @@ SWIGOPT += -package $*
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $*; $(swig_and_compile_cpp); ) && \
|
+(cd $* && $(swig_and_compile_cpp))
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $*; $(swig_and_compile_c); ) && \
|
+(cd $* && $(swig_and_compile_c))
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
(cd $*; $(swig_and_compile_multi_cpp); ) && \
|
+(cd $* && $(swig_and_compile_multi_cpp))
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Makes a directory for the testcase if it does not exist
|
# Makes a directory for the testcase if it does not exist
|
||||||
|
|
@ -66,7 +66,7 @@ setup = \
|
||||||
# a file is found which has _runme.java appended after the testcase name.
|
# a file is found which has _runme.java appended after the testcase name.
|
||||||
# Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X.
|
# Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X.
|
||||||
run_testcase = \
|
run_testcase = \
|
||||||
(cd $* && javac -classpath . *.java; ) && \
|
(cd $* && javac -classpath . *.java) && \
|
||||||
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
|
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
|
||||||
javac -classpath . -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
|
javac -classpath . -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
|
||||||
env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_LIBRARY_PATH="$*:$$DYLD_LIBRARY_PATH" java -classpath . $*\_runme;) \
|
env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_LIBRARY_PATH="$*:$$DYLD_LIBRARY_PATH" java -classpath . $*\_runme;) \
|
||||||
|
|
|
||||||
|
|
@ -27,18 +27,18 @@ LIBS = -L.
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -47,27 +47,27 @@ include $(srcdir)/../common.mk
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
echo $@ >> testing
|
echo $@ >> testing
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase) \
|
$(run_testcase)
|
||||||
if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \
|
if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \
|
||||||
echo $@ >> success ; \
|
echo $@ >> success ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
echo $@ >> testing
|
echo $@ >> testing
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase) \
|
$(run_testcase)
|
||||||
if [ -f $(@:%.ctest=%_wrap.o) ] ; then \
|
if [ -f $(@:%.ctest=%_wrap.o) ] ; then \
|
||||||
echo $@ >> success ; \
|
echo $@ >> success ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
echo $@ >> testing
|
echo $@ >> testing
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(setup) \
|
$(setup)
|
||||||
$(run_testcase) \
|
$(run_testcase)
|
||||||
if [ -f $(@:%.multicpptest=%_runtime_wrap.o) ] ; then \
|
if [ -f $(@:%.multicpptest=%_runtime_wrap.o) ] ; then \
|
||||||
echo $@ >> success ; \
|
echo $@ >> success ; \
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -29,18 +29,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,18 @@ include $(srcdir)/../common.mk
|
||||||
TARGETPREFIX =# Should be php_ for Windows, empty otherwise
|
TARGETPREFIX =# Should be php_ for Windows, empty otherwise
|
||||||
|
|
||||||
makecpptests:
|
makecpptests:
|
||||||
@bash -ec 'for test in $(CPP_TEST_CASES) ; do make clean && make $${test}.cpptest; done'
|
@bash -ec 'for test in $(CPP_TEST_CASES) ; do $(MAKE) clean && $(MAKE) $${test}.cpptest; done'
|
||||||
|
|
||||||
maketests: makecpptests makectests
|
maketests: makecpptests makectests
|
||||||
|
|
||||||
makectests:
|
makectests:
|
||||||
@bash -ec 'for test in $(C_TEST_CASES) ; do make clean && make $${test}.cpptest; done'
|
@bash -ec 'for test in $(C_TEST_CASES) ; do $($(MAKE)) clean && $(MAKE) $${test}.cpptest; done'
|
||||||
|
|
||||||
runcpptests:
|
runcpptests:
|
||||||
@bash -ec 'for test in $(CPP_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then make clean && make $${test}.cpptest; fi ; done'
|
@bash -ec 'for test in $(CPP_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi ; done'
|
||||||
|
|
||||||
runctests:
|
runctests:
|
||||||
@bash -ec 'for test in $(C_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then make clean && make $${test}.cpptest; fi; done'
|
@bash -ec 'for test in $(C_TEST_CASES) ; do if [ -f $${test}_runme.php4 ] ; then $(MAKE) clean && $(MAKE) $${test}.cpptest; fi; done'
|
||||||
|
|
||||||
runtests: runcpptests runctests
|
runtests: runcpptests runctests
|
||||||
|
|
||||||
|
|
@ -41,18 +41,18 @@ missingtests: missingcpptests missingctests
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -67,18 +67,18 @@ LIBS = -L.
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
@ -112,7 +112,7 @@ cvsignore:
|
||||||
|
|
||||||
hugemod:
|
hugemod:
|
||||||
perl hugemod.pl
|
perl hugemod.pl
|
||||||
make hugemod_a.cpptest
|
$(MAKE) hugemod_a.cpptest
|
||||||
make hugemod_b.cpptest
|
$(MAKE) hugemod_b.cpptest
|
||||||
time $(PYTHON) hugemod_runme.py
|
time $(PYTHON) hugemod_runme.py
|
||||||
time $(PYTHON) hugemod_runme.py
|
time $(PYTHON) hugemod_runme.py
|
||||||
|
|
|
||||||
|
|
@ -20,18 +20,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) && \
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) && \
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) && \
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase.
|
# Runs the testcase.
|
||||||
|
|
|
||||||
|
|
@ -46,18 +46,18 @@ SWIGOPT += -w801 -noautorename -features autodoc=4
|
||||||
naming.cpptest: SWIGOPT = -autorename
|
naming.cpptest: SWIGOPT = -autorename
|
||||||
|
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
@ -69,7 +69,7 @@ run_testcase = \
|
||||||
|
|
||||||
# Clean
|
# Clean
|
||||||
%.clean:
|
%.clean:
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile ruby_clean
|
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile ruby_clean
|
||||||
|
|
|
||||||
|
|
@ -34,18 +34,18 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,18 @@ CPP_TEST_CASES =
|
||||||
|
|
||||||
# Rules for the different types of tests
|
# Rules for the different types of tests
|
||||||
%.cpptest:
|
%.cpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_cpp); ) &&\
|
+$(swig_and_compile_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.ctest:
|
%.ctest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_c); ) &&\
|
+$(swig_and_compile_c)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
%.multicpptest:
|
%.multicpptest:
|
||||||
$(setup) \
|
$(setup)
|
||||||
($(swig_and_compile_multi_cpp); ) &&\
|
+$(swig_and_compile_multi_cpp)
|
||||||
$(run_testcase)
|
$(run_testcase)
|
||||||
|
|
||||||
# Runs the testcase. A testcase is only run if
|
# Runs the testcase. A testcase is only run if
|
||||||
|
|
|
||||||
60
Makefile.in
60
Makefile.in
|
|
@ -70,8 +70,6 @@ chk-set-swiglib = SWIG_LIB=@ROOT_DIR@/Lib
|
||||||
chk-set-swig = SWIG=@ROOT_DIR@/$(TARGET)
|
chk-set-swig = SWIG=@ROOT_DIR@/$(TARGET)
|
||||||
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)
|
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)
|
||||||
|
|
||||||
chk = $(MAKE) -k -s $(chk-set-env) $(ACTION)
|
|
||||||
|
|
||||||
check-aliveness:
|
check-aliveness:
|
||||||
test -x ./$(TARGET)
|
test -x ./$(TARGET)
|
||||||
./$(TARGET) -version
|
./$(TARGET) -version
|
||||||
|
|
@ -114,26 +112,47 @@ check-examples: \
|
||||||
check-cffi-examples \
|
check-cffi-examples \
|
||||||
check-r-examples
|
check-r-examples
|
||||||
|
|
||||||
check-%-examples:
|
tcl_examples :=$(shell sed '/^\#/d' Examples/tcl/check.list)
|
||||||
@passed=true; \
|
perl5_examples :=$(shell sed '/^\#/d' Examples/perl5/check.list)
|
||||||
dir="Examples/$*"; \
|
python_examples :=$(shell sed '/^\#/d' Examples/python/check.list)
|
||||||
if $(skip-$*); then \
|
java_examples :=$(shell sed '/^\#/d' Examples/java/check.list)
|
||||||
|
guile_examples :=$(shell sed '/^\#/d' Examples/guile/check.list)
|
||||||
|
mzscheme_examples :=$(shell sed '/^\#/d' Examples/mzscheme/check.list)
|
||||||
|
ruby_examples :=$(shell sed '/^\#/d' Examples/ruby/check.list)
|
||||||
|
ocaml_examples :=$(shell sed '/^\#/d' Examples/ocaml/check.list)
|
||||||
|
php4_examples :=$(shell sed '/^\#/d' Examples/php4/check.list)
|
||||||
|
pike_examples :=$(shell sed '/^\#/d' Examples/pike/check.list)
|
||||||
|
chicken_examples :=$(shell sed '/^\#/d' Examples/chicken/check.list)
|
||||||
|
csharp_examples :=$(shell sed '/^\#/d' Examples/csharp/check.list)
|
||||||
|
modula3_examples :=$(shell sed '/^\#/d' Examples/modula3/check.list)
|
||||||
|
lua_examples :=$(shell sed '/^\#/d' Examples/lua/check.list)
|
||||||
|
allegrocl_examples :=
|
||||||
|
clisp_examples :=
|
||||||
|
uffi_examples :=
|
||||||
|
cffi_examples :=
|
||||||
|
r_examples :=
|
||||||
|
|
||||||
|
# all examples
|
||||||
|
check-%-examples :
|
||||||
|
@if $(skip-$*); then \
|
||||||
echo skipping $* $(ACTION); \
|
echo skipping $* $(ACTION); \
|
||||||
elif [ ! -f $$dir/check.list ]; then \
|
|
||||||
echo skipping $* $(ACTION) "(no $$dir/check.list)"; \
|
|
||||||
else \
|
else \
|
||||||
all=`sed '/^#/d' $$dir/check.list`; \
|
$(MAKE) -k -s $($*_examples:=.actionexample) LANGUAGE=$* ACTION=$(ACTION); \
|
||||||
for a in $$all; do \
|
fi;
|
||||||
if $(skip-gcj) && test $$a = "java"; then \
|
|
||||||
echo "skipping $* $$dir/$$a $(ACTION) (gcj test)";\
|
# individual example
|
||||||
else \
|
%.actionexample:
|
||||||
echo $(ACTION)ing $$dir/$$a; \
|
@echo $(ACTION)ing Examples/$(LANGUAGE)/$*
|
||||||
(cd $$dir/$$a && $(chk)) \
|
@(cd Examples/$(LANGUAGE)/$* && $(MAKE) -s $(chk-set-env) $(ACTION))
|
||||||
|| passed=false; \
|
|
||||||
fi; \
|
# gcj individual example
|
||||||
done; \
|
java.actionexample:
|
||||||
|
@if $(skip-gcj); then \
|
||||||
|
echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \
|
||||||
|
else \
|
||||||
|
echo $(ACTION)ing Examples/$(LANGUAGE)/java; \
|
||||||
|
(cd Examples/$(LANGUAGE)/java && $(MAKE) -s $(chk-set-env) $(ACTION)) \
|
||||||
fi; \
|
fi; \
|
||||||
test $$passed = true
|
|
||||||
|
|
||||||
gifplot-library:
|
gifplot-library:
|
||||||
@echo $(ACTION)ing Examples/GIFPlot/Lib
|
@echo $(ACTION)ing Examples/GIFPlot/Lib
|
||||||
|
|
@ -167,7 +186,8 @@ check-%-gifplot: gifplot-library
|
||||||
all=`sed '/^#/d' $$dir/check.list`; \
|
all=`sed '/^#/d' $$dir/check.list`; \
|
||||||
for a in $$all; do \
|
for a in $$all; do \
|
||||||
echo $(ACTION)ing $$dir/$$a; \
|
echo $(ACTION)ing $$dir/$$a; \
|
||||||
(cd $$dir/$$a && $(chk)) \
|
(cd $$dir/$$a && \
|
||||||
|
$(MAKE) -k -s $(chk-set-env) $(ACTION)) \
|
||||||
|| passed=false; \
|
|| passed=false; \
|
||||||
done; \
|
done; \
|
||||||
fi; \
|
fi; \
|
||||||
|
|
|
||||||
6
README
6
README
|
|
@ -416,7 +416,11 @@ many parts of the implementation including obscure corner cases. If some
|
||||||
of these tests fail or generate warning messages, there is no reason for
|
of these tests fail or generate warning messages, there is no reason for
|
||||||
alarm---the test may be related to some new SWIG feature or a difficult bug
|
alarm---the test may be related to some new SWIG feature or a difficult bug
|
||||||
that we're trying to resolve. Chances are that SWIG will work just fine
|
that we're trying to resolve. Chances are that SWIG will work just fine
|
||||||
for you.
|
for you. Note that if you have more than one CPU/core, then you can use
|
||||||
|
parallel make can be used to speed up the check as it does take quite some
|
||||||
|
time to run, for example:
|
||||||
|
|
||||||
|
% make -j2 -k check
|
||||||
|
|
||||||
Also, SWIG's support for C++ is sufficiently advanced that certain
|
Also, SWIG's support for C++ is sufficiently advanced that certain
|
||||||
tests may fail on older C++ compilers (for instance if your compiler
|
tests may fail on older C++ compilers (for instance if your compiler
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue