[llvm-commits] [zorg] r99169 - in /zorg/trunk/lnt/lnt: lnttool/import_data.py util/ImportData.py
Daniel Dunbar
daniel at zuster.org
Mon Mar 22 00:18:51 PDT 2010
Author: ddunbar
Date: Mon Mar 22 02:18:51 2010
New Revision: 99169
URL: http://llvm.org/viewvc/llvm-project?rev=99169&view=rev
Log:
LNT: Add 'lnt import' option to disable email reports.
Modified:
zorg/trunk/lnt/lnt/lnttool/import_data.py
zorg/trunk/lnt/lnt/util/ImportData.py
Modified: zorg/trunk/lnt/lnt/lnttool/import_data.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/import_data.py?rev=99169&r1=99168&r2=99169&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/import_data.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/import_data.py Mon Mar 22 02:18:51 2010
@@ -21,6 +21,8 @@
default=False)
parser.add_option("", "--show-sample-count", dest="showSampleCount",
action="store_true", default=False)
+ parser.add_option("", "--no-email", dest="noEmail",
+ action="store_true", default=False)
(opts, args) = parser.parse_args(args)
if len(args) < 2:
@@ -49,4 +51,5 @@
for file in args:
success, run = ImportData.import_and_report(
config, opts.database, db, file, sys.stdout,
- opts.format, opts.commit, opts.showSampleCount)
+ opts.format, opts.commit, opts.showSampleCount,
+ opts.noEmail)
Modified: zorg/trunk/lnt/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/ImportData.py?rev=99169&r1=99168&r2=99169&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/ImportData.py (original)
+++ zorg/trunk/lnt/lnt/util/ImportData.py Mon Mar 22 02:18:51 2010
@@ -5,7 +5,7 @@
from lnt.util import NTEmailReport
def import_and_report(config, db_name, db, file, log, format, commit=False,
- show_sample_count=False):
+ show_sample_count=False, disable_email=False):
"""
import_file(config, db_name, db, file) -> (success, run, log)
@@ -24,6 +24,8 @@
startTime = time.time()
try:
data = formats.read_any(file, format)
+ except KeyboardInterrupt:
+ raise
except:
print >>log, 'ERROR: %r: load failed' % file
return (False, None)
@@ -48,6 +50,8 @@
importStartTime = time.time()
try:
success,run = PerfDB.importDataFromDict(db, data)
+ except KeyboardInterrupt:
+ raise
except:
print >>log, 'ERROR: %r: import failed' % file
return (False, None)
@@ -61,7 +65,7 @@
for ri in run.info.values():
print >>log, " INFO : %r = %r" % (ri.key, ri.value)
- if config.ntEmailEnabled:
+ if not disable_email and config.ntEmailEnabled:
print >>log, "\nMAILING RESULTS TO: %r\n" % toAddress
NTEmailReport.emailReport(db, run,
"%s/db_%s/nightlytest/" % (config.zorgURL,
More information about the llvm-commits
mailing list