| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Functions specific to build slaves, shared by several buildbot scripts. | 6 """Functions specific to build slaves, shared by several buildbot scripts. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import commands | 9 import commands |
| 10 import os | 10 import os |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 'setup_mount.bat') | 244 'setup_mount.bat') |
| 245 | 245 |
| 246 chromium_utils.RunCommand([setup_mount]) | 246 chromium_utils.RunCommand([setup_mount]) |
| 247 else: | 247 else: |
| 248 os.environ['PYTHONPATH'] = (chromium_utils.FindUpward(build_dir, | 248 os.environ['PYTHONPATH'] = (chromium_utils.FindUpward(build_dir, |
| 249 'tools', 'python') + ":" + os.environ.get('PYTHONPATH', '')) | 249 'tools', 'python') + ":" + os.environ.get('PYTHONPATH', '')) |
| 250 python_exe = 'python' | 250 python_exe = 'python' |
| 251 | 251 |
| 252 if sys.platform == 'linux2': | 252 if sys.platform == 'linux2': |
| 253 slave_name = SlaveBuildName(build_dir) | 253 slave_name = SlaveBuildName(build_dir) |
| 254 StartVirtualX(slave_name, os.path.join(build_dir, '..', 'out', target)) | 254 StartVirtualX(slave_name, |
| 255 | 255 os.path.join(build_dir, '..', 'sconsbuild', target)) |
| 256 | 256 |
| 257 if sys.platform == 'darwin': | 257 if sys.platform == 'darwin': |
| 258 # CrashReporter/ReportCrash take forever to walk through all of the | 258 # CrashReporter/ReportCrash take forever to walk through all of the |
| 259 # debugging symbols. Since we expect crashes, strip the debugging | 259 # debugging symbols. Since we expect crashes, strip the debugging |
| 260 # symbols so that ReportCrash doesn't have so much to chew on. | 260 # symbols so that ReportCrash doesn't have so much to chew on. |
| 261 # TODO(mmentovai): instead of stripping symbols, come up with a better | 261 # TODO(mmentovai): instead of stripping symbols, come up with a better |
| 262 # way to suppress ReportCrash from within the TestShell process. | 262 # way to suppress ReportCrash from within the TestShell process. |
| 263 test_shell_executable = chromium_utils.FindUpward(build_dir, | 263 test_shell_executable = chromium_utils.FindUpward(build_dir, |
| 264 'xcodebuild', | 264 'xcodebuild', |
| 265 target, | 265 target, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 # Run the gsutil command. gsutil internally calls command_wrapper, which | 395 # Run the gsutil command. gsutil internally calls command_wrapper, which |
| 396 # will try to run the command 10 times if it fails. | 396 # will try to run the command 10 times if it fails. |
| 397 global command_output | 397 global command_output |
| 398 command_output = '' | 398 command_output = '' |
| 399 def GatherOutput(line): | 399 def GatherOutput(line): |
| 400 global command_output | 400 global command_output |
| 401 command_output += line + '\n' | 401 command_output += line + '\n' |
| 402 command = [gsutil, 'ls', '-l', gs_base] | 402 command = [gsutil, 'ls', '-l', gs_base] |
| 403 status = chromium_utils.RunCommand(command, parser_func=GatherOutput) | 403 status = chromium_utils.RunCommand(command, parser_func=GatherOutput) |
| 404 return (status, command_output) | 404 return (status, command_output) |
| OLD | NEW |