summaryrefslogtreecommitdiff
path: root/piglit-summary.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2013-05-22 02:15:38 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2013-07-02 12:10:41 -0700
commitb6548469127eeaca07ef1afd9e066d7f5a65979a (patch)
tree23edb16574474f53a1dc41019a020414b61d3915 /piglit-summary.py
parent19f901c5ff1eaf86da8f124469b3b6a5ae2d7fd3 (diff)
piglit-summary.py: Make -s and -d mutually exclusive
Since -s/--summary will always override -d/--diff don't allow them to be called together. While this may seem a little confusing, the idea of asking for --diffs and then not getting them is a bug in the original implementation. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'piglit-summary.py')
-rwxr-xr-xpiglit-summary.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/piglit-summary.py b/piglit-summary.py
index 70c74dcba..f07d644d2 100755
--- a/piglit-summary.py
+++ b/piglit-summary.py
@@ -44,16 +44,22 @@ def parse_listfile(filename):
return open(filename, "r").read().rstrip().split('\n')
+
def main():
parser = argparse.ArgumentParser()
- parser.add_argument("-d", "--diff",
+
+ # Set the -d and -s options as exclusive, since it's silly to call for diff
+ # and then call for only summary
+ excGroup1 = parser.add_mutually_exclusive_group()
+ excGroup1.add_argument("-d", "--diff",
action = "store_true",
help = "Only display the differences between"
"multiple result files")
- parser.add_argument("-s", "--summary",
+ excGroup1.add_argument("-s", "--summary",
action = "store_true",
help = "Only display the summary, not the"
"individual test results")
+
parser.add_argument("-l", "--list",
action = "store",
help = "Use test results from a list file")