summaryrefslogtreecommitdiff
path: root/cpp/allTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/allTests.py')
-rwxr-xr-xcpp/allTests.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index b50b48edd69..3e1f8911116 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -106,11 +106,11 @@ if TestUtil.isCygwin() == 0:
]
def usage():
- print "usage: " + sys.argv[0] + " [-l]"
+ print "usage: " + sys.argv[0] + " [-l] [-r <regex>"
sys.exit(2)
try:
- opts, args = getopt.getopt(sys.argv[1:], "l")
+ opts, args = getopt.getopt(sys.argv[1:], "lr:")
except getopt.GetoptError:
usage()
@@ -121,6 +121,12 @@ loop = 0
for o, a in opts:
if o == "-l":
loop = 1
+ if o == "-r":
+ import re
+ regexp = re.compile(a)
+ newtests = []
+ def rematch(x): return regexp.match(x)
+ tests = filter(rematch, tests)
if loop:
num = 1