| 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 """Entry point for the AddIn build bot. | 5 """Entry point for the AddIn build bot. |
| 6 | 6 |
| 7 Perform build steps and output results using the buildbot | 7 Perform build steps and output results using the buildbot |
| 8 annootator syntax | 8 annootator syntax |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 def RunCommand(cmd, env=None): | 27 def RunCommand(cmd, env=None): |
| 28 Log("Running: %s" % cmd) | 28 Log("Running: %s" % cmd) |
| 29 Log("CWD: %s" % os.getcwd()) | 29 Log("CWD: %s" % os.getcwd()) |
| 30 if type(cmd) == str: | 30 if type(cmd) == str: |
| 31 cmd = cmd.split() | 31 cmd = cmd.split() |
| 32 | 32 |
| 33 if sys.platform == 'cygwin': | 33 if sys.platform == 'cygwin': |
| 34 # allow bat files in the current working directory to | 34 # allow bat files in the current working directory to |
| 35 # be executed on cygwin as they are on win32 | 35 # be executed on cygwin as they are on win32 |
| 36 if not os.path.dirname(cmd[0]) and os.path.exists(cmd[0]): | 36 if not os.path.dirname(cmd[0]) and os.path.exists(cmd[0]): |
| 37 cmd = './' + cmd | 37 cmd[0] = './' + cmd[0] |
| 38 | 38 |
| 39 rtn = subprocess.call(cmd, shell=True, env=env) | 39 rtn = subprocess.call(cmd, env=env) |
| 40 if rtn: | 40 if rtn: |
| 41 Log("Command returned non-zero exit code: %s" % rtn) |
| 41 Log('@@@STEP_FAILURE@@@') | 42 Log('@@@STEP_FAILURE@@@') |
| 42 sys.exit(1) | 43 sys.exit(1) |
| 43 | 44 |
| 44 | 45 |
| 45 def StepBuild(): | 46 def StepBuild(): |
| 46 Log('@@@BUILD_STEP build AddIn@@@') | 47 Log('@@@BUILD_STEP build AddIn@@@') |
| 47 RunCommand('build.bat') | 48 RunCommand('build.bat') |
| 48 | 49 |
| 49 | 50 |
| 50 def StepInstall(): | 51 def StepInstall(): |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 def main(): | 134 def main(): |
| 134 StepBuild() | 135 StepBuild() |
| 135 StepInstall() | 136 StepInstall() |
| 136 StepInstallSDK() | 137 StepInstallSDK() |
| 137 StepTest() | 138 StepTest() |
| 138 StepArchive() | 139 StepArchive() |
| 139 | 140 |
| 140 | 141 |
| 141 if __name__ == '__main__': | 142 if __name__ == '__main__': |
| 142 main() | 143 main() |
| OLD | NEW |