summaryrefslogtreecommitdiff
path: root/cpp/allTests.py
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-04-26 01:53:28 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-04-26 01:53:28 +0000
commitdd156ca60e1b088fdd429a113c5636db2ce59a9e (patch)
tree94fb3505d4453324032c10cf798415f3c5e41e5f /cpp/allTests.py
parentchanged getSessionTimeout to return a long. (diff)
downloadice-dd156ca60e1b088fdd429a113c5636db2ce59a9e.tar.bz2
ice-dd156ca60e1b088fdd429a113c5636db2ce59a9e.tar.xz
ice-dd156ca60e1b088fdd429a113c5636db2ce59a9e.zip
added -r <regexp> option to allTests.
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