summaryrefslogtreecommitdiff
path: root/piglit
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-05-03 14:09:56 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-05-10 14:35:19 -0700
commita7cad94da6e53ba47c6990792e9d7663513fd645 (patch)
tree022282ebd7df83aab4d237a032782aa2883ce88e /piglit
parentcc4fcb5d966098ba4ea8b88e41441872694ef7ca (diff)
framework: Add piglit-print-commands to the piglit command
This is mostly just restructuring code so that piglit-print-command works like the other piglit-* commands, calling back into the same module that the main piglit application does. This allows the addition of the 'piglit print-cmds' for those who prefer that (or who use an installed piglit and don't have piglit-*. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'piglit')
-rwxr-xr-xpiglit5
1 files changed, 5 insertions, 0 deletions
diff --git a/piglit b/piglit
index e3c1f51e5..05fff141e 100755
--- a/piglit
+++ b/piglit
@@ -110,6 +110,7 @@ def setup_module_search_path():
setup_module_search_path()
import framework.programs.run as run
import framework.programs.summary as summary
+import framework.programs.print_commands as pc
def main():
@@ -121,6 +122,10 @@ def main():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
+ print_cmd = subparsers.add_parser('print-cmd',
+ add_help=False,
+ help="Print piglit commands, one per line.")
+ print_cmd.set_defaults(func=pc.main)
parse_run = subparsers.add_parser('run',
add_help=False,