From 2d0d4ef5cc44238162a4637ba4c3e725cb1016bd Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 26 May 2008 18:06:22 -0700 Subject: [PATCH] runtest: Add an option to run the tests with valgrind --- tools/runtest | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/runtest b/tools/runtest index 43f513f..04cc635 100755 --- a/tools/runtest +++ b/tools/runtest @@ -38,6 +38,7 @@ Options: -P name set the current platform name -M names set the module names to be tested -T dir set Wine tree top directory (autodetected if not specified) + -V run the tests under valgrind EOF exit 1 @@ -46,6 +47,7 @@ EOF # Default values platform=$WINETEST_PLATFORM WINETEST_DEBUG=${WINETEST_DEBUG:-1} +valgrind="" # parse command-line options while [ "$#" != 0 ]; do @@ -76,6 +78,9 @@ while [ "$#" != 0 ]; do shift; topobjdir="$1" if [ ! -d "$topobjdir" ]; then usage; fi ;; + -V) + valgrind="${VALGRIND_CMD:-"valgrind"} --" + ;; --) break ;; @@ -118,4 +123,5 @@ fi WINETEST_PLATFORM=${platform:-wine} export WINETEST_PLATFORM WINETEST_DEBUG -exec "$topobjdir/wine" "$program" "$infile" "$@" +exec ${valgrind} "$topobjdir/wine" "$program" "$infile" "$@" + -- 1.5.5.1