aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2012-10-06 01:33:22 -0700
committerJordan Justen <jordan.l.justen@intel.com>2012-10-19 18:08:03 -0700
commiteaa315c650a59bb431f11ced6a3129db8163438b (patch)
treea06ebae672dc9a1f6e4527279478ff622aa04ea7
parent58dfd638c12d8090f1d6137ef7476aa9cb29a02a (diff)
downloadpiglit-eaa315c650a59bb431f11ced6a3129db8163438b.tar.gz
piglit-run.py: add -p|--platform switch to select the piglit platform
This can be useful with gbm when running piglit-run.py under sudo. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
-rwxr-xr-xpiglit-run.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/piglit-run.py b/piglit-run.py
index 07bab900..ced81606 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -53,6 +53,7 @@ Options:
-c bool, --concurrent=bool Enable/disable concurrent test runs. Valid
option values are: 0, 1, on, off. (default: on)
--valgrind Run tests in valgrind's memcheck.
+ -p platform, --platform=platform Name of the piglit platform to use.
Example:
%(progName)s tests/all.tests results/all
Run all tests, store the results in the directory results/all
@@ -84,8 +85,9 @@ def main():
"name=",
"exclude-tests=",
"concurrent=",
+ "platform=",
]
- options, args = getopt(sys.argv[1:], "hdrt:n:x:c:", option_list)
+ options, args = getopt(sys.argv[1:], "hdrt:n:x:c:p:", option_list)
except GetoptError:
usage()
@@ -93,6 +95,7 @@ def main():
OptionResume = False
test_filter = []
exclude_filter = []
+ platform = None
for name, value in options:
if name in ('-h', '--help'):
@@ -118,6 +121,11 @@ def main():
env.concurrent = False
else:
usage()
+ elif name in ('-p, --platform'):
+ platform = value
+
+ if platform is not None:
+ os.environ['PIGLIT_PLATFORM'] = platform
if OptionResume:
if test_filter or OptionName: