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

Side by Side Diff: appengine/findit/waterfall/flake/step_mapper.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import json 5 import json
6 import os 6 import os
7 7
8 import logging 8 import logging
9 9
10 from common.http_client_appengine import HttpClientAppengine as HttpClient 10 from common.http_client_appengine import HttpClientAppengine as HttpClient
11 from gae_libs import caches 11 from gae_libs import caches
12 from lib import cache_decorator 12 from libs import cache_decorator
13 from waterfall import buildbot 13 from waterfall import buildbot
14 from waterfall import swarming_util 14 from waterfall import swarming_util
15 15
16 16
17 @cache_decorator.Cached( 17 @cache_decorator.Cached(
18 namespace='trybots', cache=caches.CompressedMemCache()) 18 namespace='trybots', cache=caches.CompressedMemCache())
19 def _LoadTrybots(): # pragma: no cover. 19 def _LoadTrybots(): # pragma: no cover.
20 """Returns the mapping of Commit Queue trybots to Waterfall buildbots.""" 20 """Returns the mapping of Commit Queue trybots to Waterfall buildbots."""
21 with open(os.path.join(os.path.dirname(__file__), 'trybots.json'), 'r') as f: 21 with open(os.path.join(os.path.dirname(__file__), 'trybots.json'), 'r') as f:
22 return json.load(f) 22 return json.load(f)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 output = swarming_util.RetrieveShardedTestResultsFromIsolatedServer( 162 output = swarming_util.RetrieveShardedTestResultsFromIsolatedServer(
163 step_isolated_data[:1], http_client) 163 step_isolated_data[:1], http_client)
164 if output: 164 if output:
165 # Guess from the format. 165 # Guess from the format.
166 build_step.supported = ( 166 build_step.supported = (
167 isinstance(output, dict) and 167 isinstance(output, dict) and
168 isinstance(output.get('all_tests'), list) and 168 isinstance(output.get('all_tests'), list) and
169 isinstance(output.get('per_iteration_data'), list) and 169 isinstance(output.get('per_iteration_data'), list) and
170 all(isinstance(i, dict) for i in output.get('per_iteration_data')) 170 all(isinstance(i, dict) for i in output.get('per_iteration_data'))
171 ) 171 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698