|
From: <sv...@va...> - 2006-10-23 18:38:42
|
Author: njn
Date: 2006-10-23 19:38:35 +0100 (Mon, 23 Oct 2006)
New Revision: 6338
Log:
Add --valgrind-lib, to complement --valgrind, to the regtests script
(from Dave Nomura).
Modified:
trunk/tests/vg_regtest.in
Modified: trunk/tests/vg_regtest.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tests/vg_regtest.in 2006-10-21 23:19:52 UTC (rev 6337)
+++ trunk/tests/vg_regtest.in 2006-10-23 18:38:35 UTC (rev 6338)
@@ -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/valgri=
nd.
+# (This option should probably only be used in conjunction=
with
+# --valgrind-lib.)
+# --valgrind-lib: valgrind libraries to use. Default is $tests_dir/.i=
n_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 in=
stalled
# in $PREFIX):
@@ -83,7 +88,7 @@
#-----------------------------------------------------------------------=
-----
# Global vars
#-----------------------------------------------------------------------=
-----
-my $usage=3D"vg_regtest [--all, --valgrind]\n";
+my $usage=3D"vg_regtest [--all, --valgrind, --valgrind-lib]\n";
=20
my $tmp=3D"vg_regtest.tmp.$$";
=20
@@ -107,6 +112,8 @@
=20
chomp(my $tests_dir =3D `pwd`);
=20
+my $valgrind_lib =3D "$tests_dir/.in_place";
+
# default filter is the one named "filter_stderr" in the test's director=
y
my $default_stderr_filter =3D "filter_stderr";
=20
@@ -152,6 +159,8 @@
$alldirs =3D 1;
} elsif ($arg =3D~ /^--valgrind=3D(.*)$/) {
$valgrind =3D $1;
+ } elsif ($arg =3D~ /^--valgrind-lib=3D(.*)$/) {
+ $valgrind_lib =3D $1;
} else {
die $usage;
}
@@ -299,7 +308,7 @@
# VALGRIND_LIB_INNER in case this Valgrind was configured with
# --enable-inner.
my $tool=3Ddetermine_tool();
- mysystem("VALGRIND_LIB=3D$tests_dir/.in_place VALGRIND_LIB_INNER=3D$=
tests_dir/.in_place "
+ mysystem("VALGRIND_LIB=3D$valgrind_lib VALGRIND_LIB_INNER=3D$valgrin=
d_lib "
. "$valgrind --command-line-only=3Dyes --memcheck:leak-check=3D=
no "
. "--tool=3D$tool $extraopts $vgopts "
. "$prog $args > $name.stdout.out 2> $name.stderr.out");
|