| OLD | NEW |
| 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 """Set of utilities to add commands to a buildbot factory. | 5 """Set of utilities to add commands to a buildbot factory. |
| 6 | 6 |
| 7 This is based on commands.py and adds skia-specific commands.""" | 7 This is based on commands.py and adds skia-specific commands.""" |
| 8 | 8 |
| 9 from buildbot.steps import shell | 9 from buildbot.steps import shell |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 def AddUploadToBucket(self, source_filepath, | 57 def AddUploadToBucket(self, source_filepath, |
| 58 dest_gsbase='gs://chromium-skia-gm', | 58 dest_gsbase='gs://chromium-skia-gm', |
| 59 description='Upload', timeout=None): | 59 description='Upload', timeout=None): |
| 60 """Adds a step that uploads a file to a Google Storage Bucket.""" | 60 """Adds a step that uploads a file to a Google Storage Bucket.""" |
| 61 # TODO(epoger): this should use self._script_dir instead of the manually | 61 # TODO(epoger): this should use self._script_dir instead of the manually |
| 62 # created path below, but I had trouble with that and didn't want it to | 62 # created path below, but I had trouble with that and didn't want it to |
| 63 # block progress for now. | 63 # block progress for now. |
| 64 slave_script_dir = self.PathJoin('..', '..', '..', '..', 'scripts', 'slave') | 64 slave_script_dir = self.PathJoin('..', '..', '..', '..', 'scripts', 'slave') |
| 65 path_to_upload_script = self.PathJoin( | 65 path_to_upload_script = self.PathJoin( |
| 66 slave_script_dir, 'skia', 'upload_to_bucket.py') | 66 slave_script_dir, 'upload_to_bucket.py') |
| 67 cmd = 'python %s --source_filepath=%s --dest_gsbase=%s' % ( | 67 cmd = 'python %s --source_filepath=%s --dest_gsbase=%s' % ( |
| 68 path_to_upload_script, source_filepath, dest_gsbase) | 68 path_to_upload_script, source_filepath, dest_gsbase) |
| 69 if not timeout: | 69 if not timeout: |
| 70 timeout = self.default_timeout | 70 timeout = self.default_timeout |
| 71 self.factory.addStep(shell.ShellCommand, description=description, | 71 self.factory.addStep(shell.ShellCommand, description=description, |
| 72 timeout=timeout, command=cmd, workdir=self.workdir, | 72 timeout=timeout, command=cmd, workdir=self.workdir, |
| 73 env=self.environment_variables) | 73 env=self.environment_variables) |
| 74 | 74 |
| 75 def AddMergeIntoSvn(self, source_dir_path, dest_svn_url, | 75 def AddMergeIntoSvn(self, source_dir_path, dest_svn_url, |
| 76 svn_username_file, svn_password_file, | 76 svn_username_file, svn_password_file, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 99 timeout=timeout, command=cmd, workdir=self.workdir, | 99 timeout=timeout, command=cmd, workdir=self.workdir, |
| 100 env=self.environment_variables) | 100 env=self.environment_variables) |
| 101 | 101 |
| 102 def AddRun(self, run_command, description='Run', timeout=None): | 102 def AddRun(self, run_command, description='Run', timeout=None): |
| 103 """Runs something we built.""" | 103 """Runs something we built.""" |
| 104 if not timeout: | 104 if not timeout: |
| 105 timeout = self.default_timeout | 105 timeout = self.default_timeout |
| 106 self.factory.addStep(shell.ShellCommand, description=description, | 106 self.factory.addStep(shell.ShellCommand, description=description, |
| 107 timeout=timeout, command=run_command, | 107 timeout=timeout, command=run_command, |
| 108 workdir=self.workdir, env=self.environment_variables) | 108 workdir=self.workdir, env=self.environment_variables) |
| OLD | NEW |