aboutsummaryrefslogtreecommitdiff
path: root/piglit-run.py
diff options
context:
space:
mode:
authorChad Versace <chad@chad-versace.us>2011-06-17 10:57:30 -0700
committerKenneth Graunke <kenneth@whitecape.org>2011-07-29 17:35:54 -0700
commit8762fc74edbc6a26de39a7507b935755e9feff5e (patch)
treebabfc14cdc37156e662343312a47a69e3873c042 /piglit-run.py
parent6a6a549863d318fdd9b7d58e2c8f4ea03fb1766f (diff)
downloadpiglit-8762fc74edbc6a26de39a7507b935755e9feff5e.tar.gz
piglit-run: Add option to enable/disable concurrent test runs
-c bool, --concurrent=bool Enable/disable concurrent test runs. Valid option values are: 0, 1, on, off. (default: on) CC: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Chad Versace <chad@chad-versace.us> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'piglit-run.py')
-rwxr-xr-xpiglit-run.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/piglit-run.py b/piglit-run.py
index 0771ede8..bbc38073 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -78,7 +78,8 @@ Options:
-x regexp, --exclude-tests=regexp Excludey matching tests (can be used
more than once)
-n name, --name=name Name of the testrun
-
+ -c bool, --concurrent=bool Enable/disable concurrent test runs. Valid
+ option values are: 0, 1, on, off. (default: on)
Example:
%(progName)s tests/all.tests results/all
Run all tests, store the results in the directory results/all
@@ -97,7 +98,15 @@ def main():
env = core.Environment()
try:
- options, args = getopt(sys.argv[1:], "hdt:n:x:", [ "help", "dry-run", "tests=", "name=", "exclude-tests=" ])
+ option_list = [
+ "help",
+ "dry-run",
+ "tests=",
+ "name=",
+ "exclude-tests=",
+ "concurrent=",
+ ]
+ options, args = getopt(sys.argv[1:], "hdt:n:x:c:", option_list)
except GetoptError:
usage()
@@ -114,6 +123,13 @@ def main():
env.exclude_filter[:0] = [re.compile(value)]
elif name in ('-n', '--name'):
OptionName = value
+ elif name in ('-c, --concurrent'):
+ if value in ('1', 'on'):
+ env.concurrent = True
+ elif value in ('0', 'off'):
+ env.concurrent = False
+ else:
+ usage()
if len(args) != 2:
usage()