[llvm-commits] [zorg] r150751 - /zorg/trunk/lnt/lnt/lnttool/main.py
Daniel Dunbar
daniel at zuster.org
Thu Feb 16 14:54:45 PST 2012
Author: ddunbar
Date: Thu Feb 16 16:54:44 2012
New Revision: 150751
URL: http://llvm.org/viewvc/llvm-project?rev=150751&view=rev
Log:
[lnt] lnt checkformat: Import and report on the results, instead of just
importing.
Modified:
zorg/trunk/lnt/lnt/lnttool/main.py
Modified: zorg/trunk/lnt/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/main.py?rev=150751&r1=150750&r2=150751&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/main.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/main.py Thu Feb 16 16:54:44 2012
@@ -6,6 +6,7 @@
import StringIO
import lnt
+import lnt.util.ImportData
from lnt import testing
from lnt.db import perfdb
from lnt.testing.util.commands import note, warning, error, fatal
@@ -77,12 +78,11 @@
if input == '-':
input = StringIO.StringIO(sys.stdin.read())
- from lnt import formats
-
db = lnt.server.db.v4db.V4DB('sqlite:///:memory:')
-
- data = formats.read_any(input, '<auto>')
- db.importDataFromDict(data)
+ result = lnt.util.ImportData.import_and_report(
+ None, None, db, input, 'json', commit = True)
+ lnt.util.ImportData.print_report_result(result, sys.stdout, sys.stderr,
+ verbose = True)
def action_runtest(name, args):
"""run a builtin test application"""
@@ -136,7 +136,6 @@
ServerUtil.submitFile(opts.submit_url, io, True, opts.verbose)
else:
# Simulate a submission to retrieve the results report.
- from lnt.util import ImportData
import tempfile
# Save the report to a temporary file.
@@ -146,10 +145,10 @@
# Construct a temporary database and import the result.
db = lnt.server.db.v4db.V4DB("sqlite:///:memory:")
- result = ImportData.import_and_report(
+ result = lnt.util.ImportData.import_and_report(
None, None, db, tmp.name, 'json', commit = True)
- ImportData.print_report_result(result, sys.stdout, sys.stderr,
- opts.verbose)
+ lnt.util.ImportData.print_report_result(result, sys.stdout, sys.stderr,
+ opts.verbose)
tmp.close()
More information about the llvm-commits
mailing list