diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2013-07-05 08:23:27 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2013-07-29 12:00:59 -0700 |
commit | c770e4eaf1ca5056a06ceb26cdc1054f1fcf37ef (patch) | |
tree | de6cf09f9c0cf2339a54984467a0d9850bd93209 /piglit-print-commands.py | |
parent | ac17e0333e90610a004688db2446a1f62f83d580 (diff) |
piglit-print-commands.py: PEP8 compliance
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'piglit-print-commands.py')
-rwxr-xr-x | piglit-print-commands.py | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/piglit-print-commands.py b/piglit-print-commands.py index fb5510c5c..ff05bf45a 100755 --- a/piglit-print-commands.py +++ b/piglit-print-commands.py @@ -23,8 +23,9 @@ import argparse +import sys +import os import os.path as path -import sys, os import time import traceback import json @@ -34,33 +35,30 @@ import framework.core as core from framework.exectest import ExecTest from framework.gleantest import GleanTest -############################################################################# -##### Main program -############################################################################# def main(): parser = argparse.ArgumentParser(sys.argv) - parser.add_argument("-t", "--include-tests", - default = [], - action = "append", - metavar = "<regex>", - help = "Run only matching tests (can be used more than once)") + default=[], + action="append", + metavar="<regex>", + help="Run only matching tests (can be used more than " + "once)") parser.add_argument("--tests", - default = [], - action = "append", - metavar = "<regex>", - help = "Run only matching tests (can be used more than once)" \ - "Deprecated") + default=[], + action="append", + metavar="<regex>", + help="Run only matching tests (can be used more than " + "once) Deprecated") parser.add_argument("-x", "--exclude-tests", - default = [], - action = "append", - metavar = "<regex>", - help = "Exclude matching tests (can be used more than once)") + default=[], + action="append", + metavar="<regex>", + help="Exclude matching tests (can be used more than " + "once)") parser.add_argument("testProfile", - metavar = "<Path to testfile>", - help = "Path to results folder") - + metavar="<Path to testfile>", + help="Path to results folder") args = parser.parse_args() # Deprecated @@ -72,10 +70,8 @@ def main(): args.include_tests = list(set(args.include_tests + args.tests)) # Set the environment, pass in the included and excluded tests - env = core.Environment( - exclude_filter=args.exclude_tests, - include_filter=args.include_tests, - ) + env = core.Environment(exclude_filter=args.exclude_tests, + include_filter=args.include_tests) # Change to the piglit's path piglit_dir = path.dirname(path.realpath(sys.argv[0])) @@ -101,5 +97,6 @@ def main(): assert(isinstance(test, ExecTest)) print name, ':::', getCommand(test) + if __name__ == "__main__": main() |