summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprograms/report.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/programs/report.py b/programs/report.py
index a7bce2c..9c8c5f9 100755
--- a/programs/report.py
+++ b/programs/report.py
@@ -198,16 +198,17 @@ def writeSummaryHtml(run_names, results, reportDir):
##### Main program
#############################################################################
-def getCombinedResults(db, run_names):
+def getCombinedResults(db, run_names, intersect):
# Sadly, SQLite can't do full outer joins, so we have to query the results
# for each run individually and reassemble them here.
individual_results = dict([(run, db.getResults(run)) for run in run_names])
# Get a set containing all test names (in slash-separated form).
# Some runs may have more tests than others; take the union.
- test_names = set()
- for run in run_names:
- test_names |= set(individual_results[run].keys())
+ if intersect:
+ test_names = set.intersection(*[set(individual_results[run].keys()) for run in run_names])
+ else:
+ test_names = set.union(*[set(individual_results[run].keys()) for run in run_names])
results = {}
for test in test_names:
@@ -222,6 +223,9 @@ def parseArguments(argv, config):
p = ArgumentParser(prog='robyn report', description='A GPU test runner')
p.add_argument('-o', '--output', default='summary',
metavar='<directory to write HTML reports to>')
+ p.add_argument('-i', '--intersect', default=False, action='store_true',
+ help='Take the intersection of the test sets rather than the union.')
+
p.add_argument('runs', nargs='+', metavar='<run name>')
# XXX: alternate database (pending refactoring)
@@ -238,7 +242,7 @@ def main(argv, config):
run_names = list(args.runs)
- results = getCombinedResults(db, run_names)
+ results = getCombinedResults(db, run_names, args.intersect)
# XXX: write detail pages