f94514b0ff
Rename swarming -> skia_swarming. Some required heavy modification to remove other dependencies on modules in build.git. Expected changes: - RECIPE_MODULE[build::<module>] -> RECIPE_MODULE[skia::<module>] - No more runit; directly run through Python. Bug: skia:6628 Change-Id: I1b1370ed387966222ce10731771dbde9020cf542 Reviewed-on: https://skia-review.googlesource.com/17448 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
# Copyright 2017 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
|
|
# TODO(borenet): This module was copied from build.git and heavily modified to
|
|
# remove dependencies on other modules in build.git. It belongs in a different
|
|
# repo. Remove this once it has been moved.
|
|
|
|
|
|
from recipe_engine import recipe_test_api
|
|
|
|
import state
|
|
|
|
class SwarmingTestApi(recipe_test_api.RecipeTestApi):
|
|
|
|
@recipe_test_api.placeholder_step_data
|
|
def summary(self, data):
|
|
return self.m.json.output(data)
|
|
|
|
def canned_summary_output(
|
|
self, shards=1, failure=False, internal_failure=False):
|
|
return self.summary({
|
|
'shards': [
|
|
{
|
|
'abandoned_ts': None,
|
|
'bot_id': 'vm30',
|
|
'completed_ts': '2014-09-25T01:42:00.123',
|
|
'created_ts': '2014-09-25T01:41:00.123',
|
|
'durations': [5.7, 31.5],
|
|
'exit_codes': [0, 0],
|
|
'failure': failure,
|
|
'id': '148aa78d7aa%02d00' % i,
|
|
'internal_failure': internal_failure,
|
|
'isolated_out': {
|
|
'isolated': 'abc123',
|
|
'isolatedserver': 'https://isolateserver.appspot.com',
|
|
'namespace': 'default-gzip',
|
|
'view_url': 'blah',
|
|
},
|
|
'modified_ts': '2014-09-25 01:42:00',
|
|
'name': 'heartbeat-canary-2014-09-25_01:41:55-os=Windows',
|
|
'outputs': [
|
|
'Heart beat succeeded on win32.\n',
|
|
'Foo',
|
|
],
|
|
'outputs_ref': {
|
|
'view_url': 'blah',
|
|
},
|
|
'started_ts': '2014-09-25T01:42:11.123',
|
|
'state': state.State.COMPLETED,
|
|
'try_number': 1,
|
|
'user': 'unknown',
|
|
} for i in xrange(shards)
|
|
],
|
|
})
|