Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: build/android/pylib/utils/flakiness_dashboard_results_uploader.py

Issue 132463007: Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move disables into modules. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Uploads the results to the flakiness dashboard server.""" 5 """Uploads the results to the flakiness dashboard server."""
6 # pylint: disable=E1002,R0201
6 7
7 import logging 8 import logging
8 import os 9 import os
9 import shutil 10 import shutil
10 import subprocess
11 import sys 11 import sys
12 import tempfile 12 import tempfile
13 import xml 13 import xml
14 14
15 15
16 # Include path when ran from a Chromium checkout. 16 # Include path when ran from a Chromium checkout.
17 sys.path.append( 17 sys.path.append(
18 os.path.abspath(os.path.join(os.path.dirname(__file__), 18 os.path.abspath(os.path.join(os.path.dirname(__file__),
19 os.pardir, os.pardir, os.pardir, os.pardir, 19 os.pardir, os.pardir, os.pardir, os.pardir,
20 'third_party', 'WebKit', 'Tools', 'Scripts'))) 20 'third_party', 'WebKit', 'Tools', 'Scripts')))
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 test_results_map=self._test_results_map, 181 test_results_map=self._test_results_map,
182 test_results_server=test_results_server, 182 test_results_server=test_results_server,
183 test_type=self._tests_type, 183 test_type=self._tests_type,
184 master_name=self._master_name) 184 master_name=self._master_name)
185 185
186 json_files = ["incremental_results.json", "times_ms.json"] 186 json_files = ["incremental_results.json", "times_ms.json"]
187 results_generator.generate_json_output() 187 results_generator.generate_json_output()
188 results_generator.generate_times_ms_file() 188 results_generator.generate_times_ms_file()
189 results_generator.upload_json_files(json_files) 189 results_generator.upload_json_files(json_files)
190 except Exception as e: 190 except Exception as e:
191 logging.error("Uploading results to test server failed: %s." % e); 191 logging.error("Uploading results to test server failed: %s." % e)
192 finally: 192 finally:
193 shutil.rmtree(tmp_folder) 193 shutil.rmtree(tmp_folder)
194 194
195 195
196 def Upload(results, flakiness_dashboard_server, test_type): 196 def Upload(results, flakiness_dashboard_server, test_type):
197 """Reports test results to the flakiness dashboard for Chrome for Android. 197 """Reports test results to the flakiness dashboard for Chrome for Android.
198 198
199 Args: 199 Args:
200 results: test results. 200 results: test results.
201 flakiness_dashboard_server: the server to upload the results to. 201 flakiness_dashboard_server: the server to upload the results to.
202 test_type: the type of the tests (as displayed by the flakiness dashboard). 202 test_type: the type of the tests (as displayed by the flakiness dashboard).
203 """ 203 """
204 uploader = ResultsUploader(test_type) 204 uploader = ResultsUploader(test_type)
205 uploader.AddResults(results) 205 uploader.AddResults(results)
206 uploader.Upload(flakiness_dashboard_server) 206 uploader.Upload(flakiness_dashboard_server)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698