[llvm-commits] [zorg] r150765 - in /zorg/trunk/lnt/lnt: server/reporting/runs.py server/ui/views.py util/NTEmailReport.py
Daniel Dunbar
daniel at zuster.org
Thu Feb 16 14:55:30 PST 2012
Author: ddunbar
Date: Thu Feb 16 16:55:29 2012
New Revision: 150765
URL: http://llvm.org/viewvc/llvm-project?rev=150765&view=rev
Log:
[lnt/v0.4] lnt.server.ui.views: Fix run report subsection to use the same
comparison run as selected by the user.
Modified:
zorg/trunk/lnt/lnt/server/reporting/runs.py
zorg/trunk/lnt/lnt/server/ui/views.py
zorg/trunk/lnt/lnt/util/NTEmailReport.py
Modified: zorg/trunk/lnt/lnt/server/reporting/runs.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/reporting/runs.py?rev=150765&r1=150764&r2=150765&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/reporting/runs.py (original)
+++ zorg/trunk/lnt/lnt/server/reporting/runs.py Thu Feb 16 16:55:29 2012
@@ -12,7 +12,8 @@
from lnt.db import runinfo
def generate_run_report(run, baseurl, only_html_body = False,
- num_comparison_runs = 10, result = None):
+ num_comparison_runs = 10, result = None,
+ compare_to = None):
"""
generate_run_report(...) -> (str: subject, str: text_report,
str: html_report)
@@ -35,10 +36,8 @@
run, num_comparison_runs))
# Get the specific run to compare to.
- if comparison_window:
+ if compare_to is None and comparison_window:
compare_to = comparison_window[0]
- else:
- compare_to = None
# Get the test names.
test_names = ts.query(ts.Test.name, ts.Test.id).order_by(ts.Test.name).all()
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=150765&r1=150764&r2=150765&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Thu Feb 16 16:55:29 2012
@@ -852,7 +852,8 @@
_, text_report, html_report = NTEmailReport.getReport(
result=None, db=db, run=run,
baseurl=db_url_for('index', _external=True),
- was_added=True, will_commit=True, only_html_body=True)
+ was_added=True, will_commit=True, only_html_body=True,
+ compare_to=compare_to)
# Gather the runs to use for statistical data.
comparison_window = list(ts.get_previous_runs_on_machine(
Modified: zorg/trunk/lnt/lnt/util/NTEmailReport.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/NTEmailReport.py?rev=150765&r1=150764&r2=150765&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/NTEmailReport.py (original)
+++ zorg/trunk/lnt/lnt/util/NTEmailReport.py Thu Feb 16 16:55:29 2012
@@ -440,14 +440,14 @@
return subject, report.getvalue(), html_report
def getReport(result, db, run, baseurl, was_added, will_commit,
- only_html_body = False):
+ only_html_body = False, compare_to = None):
report = StringIO.StringIO()
# We haven't implemented V4DB support yet in reports.
if isinstance(db, lnt.server.db.v4db.V4DB):
return lnt.server.reporting.runs.generate_run_report(
run, baseurl=baseurl, only_html_body=only_html_body,
- result=result)
+ result=result, compare_to=compare_to)
# Use a simple report unless the tag indicates this is an old style nightly
# test run.
More information about the llvm-commits
mailing list