summaryrefslogtreecommitdiff
path: root/piglit-print-commands.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2013-03-08 11:46:38 -0800
committerJordan Justen <jordan.l.justen@intel.com>2013-03-10 15:20:27 -0700
commitee9b0a8d27d9ef5025336559c6dee4e387074af3 (patch)
tree48775a2693609ac1941f05715f82fb6cbdd6c49f /piglit-print-commands.py
parent160ae02604243908898ab21085cf0b49c189e6f3 (diff)
Change --tests to --include-tests
Excluding tests already uses a similar syntax (--exclude-tests), so this is more consistent. V2: - Leaves --tests option, but marks it as deprecated Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'piglit-print-commands.py')
-rwxr-xr-xpiglit-print-commands.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/piglit-print-commands.py b/piglit-print-commands.py
index 7a3ba1479..0d27b77d2 100755
--- a/piglit-print-commands.py
+++ b/piglit-print-commands.py
@@ -48,8 +48,10 @@ Prints a list of all the tests and how to run them. Ex:
Options:
-h, --help Show this message
- -t regexp, --tests=regexp Run only matching tests (can be used more
+ -t regexp, --include-tests=regexp Run only matching tests (can be used more
than once)
+ --tests=regexp Run only matching tests (can be used more
+ than once) DEPRICATED use --include-tests instead
-x regexp, --exclude-tests=regexp Exclude matching tests (can be used
more than once)
Example:
@@ -71,6 +73,7 @@ def main():
option_list = [
"help",
"tests=",
+ "include-tests=",
"exclude-tests=",
]
options, args = getopt(sys.argv[1:], "ht:x:", option_list)
@@ -85,9 +88,14 @@ def main():
for name, value in options:
if name in ('-h', '--help'):
usage()
- elif name in ('-t', '--tests'):
+ elif name in ('-t', '--include-tests'):
test_filter.append(value)
env.filter.append(re.compile(value))
+ elif name in ('--tests'):
+ test_filter.append(value)
+ env.filter.append(re.compile(value))
+ print "Warning: Option --tets is deprecated, " \
+ "use --include-tests instead"
elif name in ('-x', '--exclude-tests'):
exclude_filter.append(value)
env.exclude_filter.append(re.compile(value))