From e63e873227944db1447e05061b5c35e594a72e3c Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Fri, 9 Nov 2007 23:29:46 +0000 Subject: [PATCH] Merge (from branches/THRCHECK) r7043: 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index d2d882ca7a..37f7df0290 100755 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -63,7 +63,8 @@ # # Expected stdout (filtered) is kept in .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 .stderr.exp[0-9]*. +# stderr (filtered) is kept in .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 -- 2.47.2