[LNT] r349791 - A few more linter fixups
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 10:25:47 PST 2018
Author: cmatthews
Date: Thu Dec 20 10:25:47 2018
New Revision: 349791
URL: http://llvm.org/viewvc/llvm-project?rev=349791&view=rev
Log:
A few more linter fixups
Modified:
lnt/trunk/lnt/lnttool/viewcomparison.py
lnt/trunk/lnt/util/ImportData.py
lnt/trunk/tests/testing/Compilers.py
Modified: lnt/trunk/lnt/lnttool/viewcomparison.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/viewcomparison.py?rev=349791&r1=349790&r2=349791&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/viewcomparison.py (original)
+++ lnt/trunk/lnt/lnttool/viewcomparison.py Thu Dec 20 10:25:47 2018
@@ -1,7 +1,13 @@
import click
+import time
+import urllib
+import webbrowser
+import sys
def _start_browser(url, debug=False):
+ from lnt.util import logger
+
def url_is_up(url):
try:
o = urllib.urlopen(url)
@@ -51,12 +57,8 @@ def action_view_comparison(report_a, rep
import logging
import os
import shutil
- import sys
import tempfile
import thread
- import time
- import urllib
- import webbrowser
init_logger(logging.ERROR)
@@ -84,7 +86,7 @@ def action_view_comparison(report_a, rep
# Import the two reports.
with contextlib.closing(config.get_database('default')) as db:
session = db.make_session()
- r = import_and_report(config, 'default', db, session, report_a,
+ import_and_report(config, 'default', db, session, report_a,
'<auto>', testsuite, select_machine='match')
import_and_report(config, 'default', db, session, report_b,
'<auto>', testsuite, select_machine='match')
Modified: lnt/trunk/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/util/ImportData.py?rev=349791&r1=349790&r2=349791&view=diff
==============================================================================
--- lnt/trunk/lnt/util/ImportData.py (original)
+++ lnt/trunk/lnt/util/ImportData.py Thu Dec 20 10:25:47 2018
@@ -1,5 +1,5 @@
from lnt.util import NTEmailReport
-
+from contextlib import closing
from lnt.util import logger
import collections
import datetime
@@ -124,7 +124,6 @@ def import_and_report(config, db_name, d
result['import_time'] = time.time() - importStartTime
- reportStartTime = time.time()
result['report_to_address'] = toAddress
if config:
report_url = "%s/db_%s/" % (config.zorgURL, db_name)
@@ -236,7 +235,6 @@ def print_report_result(result, out, err
test_index = 0
result_kinds = collections.Counter()
for i, item in enumerate(test_results):
- pset = item['pset']
pset_results = item['results']
for name, test_status, perf_status in pset_results:
@@ -330,7 +328,7 @@ def import_from_string(config, db_name,
"%04d-%02d" % (utcnow.year, utcnow.month))
try:
os.makedirs(tmpdir)
- except OSError as e:
+ except OSError:
pass
# Save the file under a name prefixed with the date, to make it easier
Modified: lnt/trunk/tests/testing/Compilers.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/testing/Compilers.py?rev=349791&r1=349790&r2=349791&view=diff
==============================================================================
--- lnt/trunk/tests/testing/Compilers.py (original)
+++ lnt/trunk/tests/testing/Compilers.py Thu Dec 20 10:25:47 2018
@@ -13,11 +13,13 @@ basedir = sys.argv[1]
logging.basicConfig(level=logging.DEBUG)
+
def get_info(name):
logging.info("checking compiler: %r", name)
return lnt.testing.util.compilers.get_cc_info(
os.path.join(basedir, name))
+
# Check icc.
info = get_info("icc-12.1.3")
pprint.pprint(info)
More information about the llvm-commits
mailing list