tools: allow running tests with valgrind (take 2)

Dan Kegel dank at kegel.com
Tue Jul 15 09:51:04 CDT 2008


This time it's minimalist!
Valgrind already reads options from $VALGRIND_OPTS, so
no need to hardcode valgrind options in tools/runtest, as
I did before.

And heck, may as well use the presence of $VALGRIND_OPTS
to control whether to run the wine tests under valgrind.

That makes the runtest patch really tiny:

diff --git a/tools/runtest b/tools/runtest
index 43f513f..ae76a2b 100755
--- a/tools/runtest
+++ b/tools/runtest
@@ -118,4 +118,10 @@ fi
 WINETEST_PLATFORM=${platform:-wine}
 export WINETEST_PLATFORM WINETEST_DEBUG

-exec "$topobjdir/wine" "$program" "$infile" "$@"
+# Detect Valgrind
+case x"$VALGRIND_OPTS"x in
+xx) ;;
+*) RUNTEST_WRAPPER=valgrind;;
+esac
+
+exec $RUNTEST_WRAPPER "$topobjdir/wine" "$program" "$infile" "$@" ;;



More information about the wine-patches mailing list