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

Side by Side Diff: scripts/slave/recipe_modules/swarming_client/api.py

Issue 1917243002: Revert "build: roll infra_paths changes" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 from recipe_engine import recipe_api 5 from recipe_engine import recipe_api
6 6
7 7
8 class SwarmingClientApi(recipe_api.RecipeApi): 8 class SwarmingClientApi(recipe_api.RecipeApi):
9 """Code that both isolate and swarming recipe modules depend on. 9 """Code that both isolate and swarming recipe modules depend on.
10 10
(...skipping 20 matching lines...) Expand all
31 otherwise. Fail-fast behavior is used because if machines silently fell back 31 otherwise. Fail-fast behavior is used because if machines silently fell back
32 to checking out the entire workspace, that would cause dramatic increases 32 to checking out the entire workspace, that would cause dramatic increases
33 in cycle time if a misconfiguration were made and it were no longer possible 33 in cycle time if a misconfiguration were made and it were no longer possible
34 for the bot to check out swarming_client separately. 34 for the bot to check out swarming_client separately.
35 """ 35 """
36 # If the following line throws an exception, it either means the 36 # If the following line throws an exception, it either means the
37 # bot is misconfigured, or, if you're testing locally, that you 37 # bot is misconfigured, or, if you're testing locally, that you
38 # need to pass in some recent legal revision for this property. 38 # need to pass in some recent legal revision for this property.
39 if revision is None: 39 if revision is None:
40 revision = self.m.properties['parent_got_swarming_client_revision'] 40 revision = self.m.properties['parent_got_swarming_client_revision']
41 self._client_path = self.m.infra_paths['slave_build'].join('swarming.client' ) 41 self._client_path = self.m.path['slave_build'].join('swarming.client')
42 self.m.git.checkout( 42 self.m.git.checkout(
43 url='https://chromium.googlesource.com/external/swarming.client.git', 43 url='https://chromium.googlesource.com/external/swarming.client.git',
44 ref=revision, 44 ref=revision,
45 dir_path=self._client_path, 45 dir_path=self._client_path,
46 step_suffix='swarming_client', 46 step_suffix='swarming_client',
47 curl_trace_file=curl_trace_file, 47 curl_trace_file=curl_trace_file,
48 can_fail_build=can_fail_build) 48 can_fail_build=can_fail_build)
49 49
50 @property 50 @property
51 def path(self): 51 def path(self):
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 # TODO(martiniss) remove once recipe 1.5 migration done 120 # TODO(martiniss) remove once recipe 1.5 migration done
121 step_result = self.m.python.inline( 121 step_result = self.m.python.inline(
122 '%s is too old' % script, 122 '%s is too old' % script,
123 'import sys; sys.exit(1)', 123 'import sys; sys.exit(1)',
124 add_python_log=False) 124 add_python_log=False)
125 # TODO(martiniss) get rid of this bare string. 125 # TODO(martiniss) get rid of this bare string.
126 step_result.presentation.status = self.m.step.FAILURE 126 step_result.presentation.status = self.m.step.FAILURE
127 step_result.presentation.step_text = abort_reason 127 step_result.presentation.step_text = abort_reason
128 128
129 raise self.m.step.StepFailure(abort_reason) 129 raise self.m.step.StepFailure(abort_reason)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698