[llvm-commits] [zorg] r110926 - in /zorg/trunk/lnt/lnt: util/ImportData.py util/NTEmailReport.py viewer/simple.ptl
Daniel Dunbar
daniel at zuster.org
Thu Aug 12 09:03:56 PDT 2010
Author: ddunbar
Date: Thu Aug 12 11:03:56 2010
New Revision: 110926
URL: http://llvm.org/viewvc/llvm-project?rev=110926&view=rev
Log:
LNT/import: Pass the result object to the report generation routines, so they
can extend it.
Modified:
zorg/trunk/lnt/lnt/util/ImportData.py
zorg/trunk/lnt/lnt/util/NTEmailReport.py
zorg/trunk/lnt/lnt/viewer/simple.ptl
Modified: zorg/trunk/lnt/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/ImportData.py?rev=110926&r1=110925&r2=110926&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/ImportData.py (original)
+++ zorg/trunk/lnt/lnt/util/ImportData.py Thu Aug 12 11:03:56 2010
@@ -73,7 +73,7 @@
result['original_run'] = run.id
result['report_to_address'] = toAddress
- NTEmailReport.emailReport(db, run,
+ NTEmailReport.emailReport(result, db, run,
"%s/db_%s/" % (config.zorgURL, db_name),
email_config, toAddress, success, commit)
Modified: zorg/trunk/lnt/lnt/util/NTEmailReport.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/NTEmailReport.py?rev=110926&r1=110925&r2=110926&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/NTEmailReport.py (original)
+++ zorg/trunk/lnt/lnt/util/NTEmailReport.py Thu Aug 12 11:03:56 2010
@@ -37,13 +37,13 @@
emailReport(db, run, baseurl, host, from_, to)
-def emailReport(db, run, baseurl, email_config, to, was_added=True,
+def emailReport(result, db, run, baseurl, email_config, to, was_added=True,
will_commit=True):
import email.mime.multipart
import email.mime.text
- subject, report, html_report = getReport(db, run, baseurl, was_added,
- will_commit)
+ subject, report, html_report = getReport(result, db, run, baseurl,
+ was_added, will_commit)
# Ignore if no to address was given, we do things this way because of the
# awkward way we collect result information as part of generating the email
@@ -88,7 +88,7 @@
best = r
return best
-def getSimpleReport(db, run, baseurl, was_added, will_commit,
+def getSimpleReport(result, db, run, baseurl, was_added, will_commit,
only_html_body = False, show_graphs = False):
machine = run.machine
tag = run.info['tag'].value
@@ -402,13 +402,13 @@
return subject, report.getvalue(), html_report
return subject, report.getvalue(), None
-def getReport(db, run, baseurl, was_added, will_commit):
+def getReport(result, db, run, baseurl, was_added, will_commit):
report = StringIO.StringIO()
# Use a simple report unless the tag indicates this is an old style nightly
# test run.
if 'tag' in run.info and run.info['tag'].value != 'nightlytest':
- return getSimpleReport(db, run, baseurl, was_added, will_commit)
+ return getSimpleReport(result, db, run, baseurl, was_added, will_commit)
machine = run.machine
compareTo = None
Modified: zorg/trunk/lnt/lnt/viewer/simple.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/simple.ptl?rev=110926&r1=110925&r2=110926&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/simple.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/simple.ptl Thu Aug 12 11:03:56 2010
@@ -412,7 +412,7 @@
show_graphs = bool(request.form.get('show_graphs'))
run,run_summary,compare_to = self.getInfo(db)
- _, _, html_report = NTEmailReport.getSimpleReport(
+ _, _, html_report = NTEmailReport.getSimpleReport(None,
db, run, str("%s/db_%s/") % (self.root.config.zorgURL,
self.root.dbName),
True, True, show_graphs = show_graphs)
@@ -424,7 +424,7 @@
run,run_summary,compare_to = self.getInfo(db)
- _, text_report, _ = NTEmailReport.getSimpleReport(
+ _, text_report, _ = NTEmailReport.getSimpleReport(None,
db, run, str("%s/db_%s/") % (self.root.config.zorgURL,
self.root.dbName),
True, True)
@@ -479,7 +479,7 @@
form.render()
self.renderPopupEnd()
- _, text_report, html_report = NTEmailReport.getSimpleReport(
+ _, text_report, html_report = NTEmailReport.getSimpleReport(None,
db, run, str("%s/db_%s/") % (self.root.config.zorgURL,
self.root.dbName),
True, True, only_html_body = True, show_graphs = show_graphs)
More information about the llvm-commits
mailing list