]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge (from branches/THRCHECK) r7043:
authorJulian Seward <jseward@acm.org>
Fri, 9 Nov 2007 23:29:46 +0000 (23:29 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 9 Nov 2007 23:29:46 +0000 (23:29 +0000)
Allow a test to have any number of .stderr.exp* files, so long as at
least one is found.  In fact the comments in the code that claimed
that .stderr.exp[0-9] are the only ones allowed were misleading;
.stderr.exp* has always been allowed.  The only functional change here
is to mandate that at least one such file exists; prior to the change
the script mandated that at least a .stderr.exp (with no other suffix)
file existed.

Purpose is to allow collections of .stderr.exp files with suffixes
arranged in some meaningful way, eg, foo.stderr.exp-glibc25-amd64.
This might help in making testsuites more maintainable when there
have to be multiple .stderr.exp files.  Naming them merely as
.stderr.exp1, .stderr.exp2, etc, makes it impossible to remember
what the differences between the files actually is.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7127

tests/vg_regtest.in

index d2d882ca7a5b997e4eecbf71222d0670c76b5458..37f7df02901e1f2f5cef4ff37842f9604376d430 100755 (executable)
@@ -63,7 +63,8 @@
 #
 # Expected stdout (filtered) is kept in <test>.stdout.exp[0-9]* (can be more
 # than one expected output).  It can be missing if it would be empty.  Expected
-# stderr (filtered) is kept in <test>.stderr.exp[0-9]*. 
+# stderr (filtered) is kept in <test>.stderr.exp*.   There must be at least
+# one stderr.exp* file.
 #
 # The prerequisite command, if present, must return 0 otherwise the test is
 # skipped.  The post-test command, if present, must return 0 and its stdout
@@ -328,9 +329,9 @@ sub do_one_test($$)
     # Filter stderr
     mysystem("$stderr_filter < $name.stderr.out > $tmp");
     rename($tmp, "$name.stderr.out");
-    # Find all the .stderr.exp files.  $name.stderr.exp must exist.
+    # Find all the .stderr.exp files.  At least one must exist.
     my @stderr_exps = <$name.stderr.exp*>;
-    (-r "$name.stderr.exp") or die "Could not read `$name.stderr.exp'\n";
+    (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
     do_diffs($fullname, $name, "stderr", \@stderr_exps); 
 
     # Maybe do post-test check