From d18cd895674dc7cac1a5155f2c4b65752818743f Mon Sep 17 00:00:00 2001
From: Dan Kegel <dank@kegel.com>
Date: Fri, 18 Jul 2008 16:31:43 -0700
Subject: [PATCH] tools: Allow running tests with valgrind.

---
 tools/runtest | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/runtest b/tools/runtest
index 43f513f9733..a3c9331c89b 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" "$@"
+# WINETEST_WRAPPER is normally empty, but can be set by caller, e.g.
+#  WINETEST_WRAPPER=time
+# would give data about how long each test takes, and
+#  WINETEST_WRAPPER=valgrind
+# would run the tests under valgrind to look for memory errors.
+
+exec $WINETEST_WRAPPER "$topobjdir/wine" "$program" "$infile" "$@"
-- 
GitLab