Author: wyoung
Date: Fri Jan 12 07:48:34 2007
New Revision: 1357
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1357&view=rev
Log:
Added 'valgrind memcheck' option to Bourne shell version of exrun, for
testing examples for sanity.
Modified:
trunk/exrun
Modified: trunk/exrun
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/exrun?rev=1357&r1=1356&r2=1357&view=diff
==============================================================================
--- trunk/exrun (original)
+++ trunk/exrun Fri Jan 12 07:48:34 2007
@@ -7,10 +7,28 @@
echo " instead of using the system library search mechanism. Accepts
an "
echo " arbitrary number of arguments."
echo
+ echo " Example can be 'valgrind' instead, in which case we run the
example"
+ echo " under valgrind in memory checking mode."
+ echo
exit 1
fi
+TOOL=
PROG=$1
+if [ "$PROG" == 'valgrind' ]
+then
+ TOOL=valgrind
+ shift
+ if [ -z "$1" ]
+ then
+ echo "usage: $0 valgrind <example> [args...]"
+ echo
+ echo " Run $0 without arguments for more detailed usage info."
+ echo
+ exit 1
+ fi
+ PROG=$1
+fi
shift
if [ ! -e libmysqlpp.so.2 ]
@@ -20,10 +38,10 @@
if [ -e /usr/bin/ldd ]
then
- LD_LIBRARY_PATH=. ./$PROG $*
+ LD_LIBRARY_PATH=. $TOOL ./$PROG $*
elif [ -e /usr/bin/otool ]
then
- DYLD_LIBRARY_PATH=. ./$PROG $*
+ DYLD_LIBRARY_PATH=. $TOOL ./$PROG $*
else
echo ERROR: I don\'t grok this system\'s dynamic linkage system.
fi
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits