summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authornjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2006-10-23 18:38:35 +0000
committernjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2006-10-23 18:38:35 +0000
commit3ed896035e9e6d7ac33f7cc23f95c54ef7d477ff (patch)
tree9f4654cd5eb9cab9545ef8079d5ecafa4435750b /tests
parentf6f1d499a4d53d7c7b53f8cf6b7ce538f10f999e (diff)
Add --valgrind-lib, to complement --valgrind, to the regtests script
(from Dave Nomura). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6338 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'tests')
-rwxr-xr-xtests/vg_regtest.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
index 8b035a25..f21c1c23 100755
--- a/tests/vg_regtest.in
+++ b/tests/vg_regtest.in
@@ -31,7 +31,12 @@
#
# Options:
# --all: run tests in all subdirs
-# --valgrind: valgrind to use. Default is one built from this source tree.
+# --valgrind: valgrind launcher to use. Default is ./coregrind/valgrind.
+# (This option should probably only be used in conjunction with
+# --valgrind-lib.)
+# --valgrind-lib: valgrind libraries to use. Default is $tests_dir/.in_place.
+# (This option should probably only be used in conjunction with
+# --valgrind.)
#
# The easiest way is to run all tests in valgrind/ with (assuming you installed
# in $PREFIX):
@@ -83,7 +88,7 @@ use strict;
#----------------------------------------------------------------------------
# Global vars
#----------------------------------------------------------------------------
-my $usage="vg_regtest [--all, --valgrind]\n";
+my $usage="vg_regtest [--all, --valgrind, --valgrind-lib]\n";
my $tmp="vg_regtest.tmp.$$";
@@ -107,6 +112,8 @@ my $valgrind = "./coregrind/valgrind";
chomp(my $tests_dir = `pwd`);
+my $valgrind_lib = "$tests_dir/.in_place";
+
# default filter is the one named "filter_stderr" in the test's directory
my $default_stderr_filter = "filter_stderr";
@@ -152,6 +159,8 @@ sub process_command_line()
$alldirs = 1;
} elsif ($arg =~ /^--valgrind=(.*)$/) {
$valgrind = $1;
+ } elsif ($arg =~ /^--valgrind-lib=(.*)$/) {
+ $valgrind_lib = $1;
} else {
die $usage;
}
@@ -299,7 +308,7 @@ sub do_one_test($$)
# VALGRIND_LIB_INNER in case this Valgrind was configured with
# --enable-inner.
my $tool=determine_tool();
- mysystem("VALGRIND_LIB=$tests_dir/.in_place VALGRIND_LIB_INNER=$tests_dir/.in_place "
+ mysystem("VALGRIND_LIB=$valgrind_lib VALGRIND_LIB_INNER=$valgrind_lib "
. "$valgrind --command-line-only=yes --memcheck:leak-check=no "
. "--tool=$tool $extraopts $vgopts "
. "$prog $args > $name.stdout.out 2> $name.stderr.out");