blob: 8a45c12dc35af2e71e8b6fccad5f0ab26095b00b [file] [log] [blame]
# Copyright 2018 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.
from recipe_engine import recipe_test_api
class GomaTestApi(recipe_test_api.RecipeTestApi):
def __call__(self, jobs=80, debug=False, enable_ats=False, server_host="",
rpc_extra_params=""):
"""Simulate pre-configured Goma through properties."""
assert isinstance(jobs, int), '%r (%s)' % (jobs, type(jobs))
ret = self.test(None)
ret.properties = {
'$build/goma': {
'jobs': jobs,
'enable_ats': enable_ats,
'server_host': server_host,
'rpc_extra_params': rpc_extra_params,
},
}
if debug:
ret.properties['$build/goma']['debug'] = True
return ret