[LNT] r189856 - Only include relevant tests in a run report.

Daniel Dunbar daniel at zuster.org
Tue Sep 3 14:19:41 PDT 2013


Author: ddunbar
Date: Tue Sep  3 16:19:41 2013
New Revision: 189856

URL: http://llvm.org/viewvc/llvm-project?rev=189856&view=rev
Log:
Only include relevant tests in a run report.

 - This limits the set of test names we consider (and thus report on) to be
   tests that appeared in any of the loaded runs. This fixes the appearance of
   spurious tests in places that look at all of the test names, for example the
   textual output from the 'lnt submit' command line tool.

 - Also, fix RunInfo.get_test_ids() to not return duplicates.

Modified:
    lnt/trunk/lnt/server/reporting/analysis.py
    lnt/trunk/lnt/server/reporting/runs.py

Modified: lnt/trunk/lnt/server/reporting/analysis.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=189856&r1=189855&r2=189856&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Tue Sep  3 16:19:41 2013
@@ -133,7 +133,7 @@ class RunInfo(object):
         self._load_samples_for_runs(runs_to_load)
 
     def get_test_ids(self):
-        return [key[1] for key in self.sample_map.keys()]
+        return set(key[1] for key in self.sample_map.keys())
     
     def get_run_comparison_result(self, run, compare_to, test_id, field,
                                   comparison_window=[]):

Modified: lnt/trunk/lnt/server/reporting/runs.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/runs.py?rev=189856&r1=189855&r2=189856&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/runs.py (original)
+++ lnt/trunk/lnt/server/reporting/runs.py Tue Sep  3 16:19:41 2013
@@ -70,7 +70,9 @@ def generate_run_report(run, baseurl, on
         ts, runs_to_load, aggregation_fn)
 
     # Get the test names, primary fields and total test counts.
-    test_names = ts.query(ts.Test.name, ts.Test.id).order_by(ts.Test.name).all()
+    test_names = ts.query(ts.Test.name, ts.Test.id).\
+        order_by(ts.Test.name).\
+        filter(ts.Test.id.in_(sri.get_test_ids())).all()
     primary_fields = list(ts.Sample.get_primary_fields())
     num_total_tests = len(primary_fields) * len(test_names)
 





More information about the llvm-commits mailing list