Fix RUNTOOL in the test-suite for php and add an example for using RUNTOOL to invoke a debugger

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12050 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-05-25 18:13:32 +00:00
commit 9f55943801
3 changed files with 15 additions and 4 deletions

View file

@ -29,14 +29,17 @@
#
# Note that the RUNTOOL, COMPILETOOL and SWIGTOOL variables can be used
# for invoking tools for the runtime tests and target language
# compiler (eg javac) respectively. For example, valgrind can be used
# for memory checking of the runtime tests using:
# compiler (eg javac), and on SWIG respectively. For example, valgrind
# can be used for memory checking of the runtime tests using:
# make RUNTOOL="valgrind --leak-check=full"
# and valgrind can be used when invoking SWIG using:
# make SWIGTOOL="valgrind --tool=memcheck --trace-children=yes"
# Note: trace-children needed because of preinst-swig shell wrapper
# to the swig executable.
#
# An individual test run can be debugged easily:
# make director_string.cpptest RUNTOOL="gdb --args"
#
# The variables below can be overridden after including this makefile
#######################################################################

View file

@ -48,9 +48,9 @@ missingtests: missingcpptests missingctests
# found, runs testcase.php, except for multicpptests.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL=$(RUNTOOL) php_run; \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL="$(RUNTOOL)" php_run; \
elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*.php RUNTOOL=$(RUNTOOL) php_run; \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*.php RUNTOOL="$(RUNTOOL)" php_run; \
fi
# Clean: remove the generated .php file