Make it possible to select or deselect test groups by number
authorRichard Levitte <levitte@openssl.org>
Thu, 9 Mar 2017 18:08:03 +0000 (19:08 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 9 Mar 2017 23:54:57 +0000 (00:54 +0100)
Examples of possible expressions (adapt to your platform):

    make test TESTS=-99
    make test TESTS=10
    make test TESTS=-9?
    make test TESTS=-[89]0
    make test TESTS=[89]0

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2887)

test/run_tests.pl

index 66697db..9c5ade1 100644 (file)
@@ -86,5 +86,8 @@ runtests(map { abs2rel($_, rel2abs(curdir())); } sort keys %tests);
 sub find_matching_tests {
     my ($glob) = @_;
 
+    if ($glob =~ m|^[\d\[\]\?\-]+$|) {
+        return glob(catfile($recipesdir,"$glob-*.t"));
+    }
     return glob(catfile($recipesdir,"*-$glob.t"));
 }