| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """A tool to run a chrome test executable, used by the buildbot slaves. | 6 """A tool to run a chrome test executable, used by the buildbot slaves. |
| 7 | 7 |
| 8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
| 9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
| 10 | 10 |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 print >> sys.stderr, e | 803 print >> sys.stderr, e |
| 804 # Don't fail. | 804 # Don't fail. |
| 805 | 805 |
| 806 return result | 806 return result |
| 807 | 807 |
| 808 | 808 |
| 809 def main_linux(options, args): | 809 def main_linux(options, args): |
| 810 if len(args) < 1: | 810 if len(args) < 1: |
| 811 raise chromium_utils.MissingArgument('Usage: %s' % USAGE) | 811 raise chromium_utils.MissingArgument('Usage: %s' % USAGE) |
| 812 | 812 |
| 813 sconsbuild_exists = os.path.exists( | |
| 814 os.path.join(os.path.dirname(options.build_dir), 'sconsbuild')) | |
| 815 out_exists = os.path.exists( | 813 out_exists = os.path.exists( |
| 816 os.path.join(os.path.dirname(options.build_dir), 'out')) | 814 os.path.join(os.path.dirname(options.build_dir), 'out')) |
| 817 build_dir, _ = build_directory.ConvertBuildDirToLegacy( | 815 build_dir, _ = build_directory.ConvertBuildDirToLegacy( |
| 818 options.build_dir, use_out=(out_exists and not sconsbuild_exists)) | 816 options.build_dir, use_out=out_exists) |
| 819 build_dir = os.path.normpath(os.path.abspath(build_dir)) | 817 build_dir = os.path.normpath(os.path.abspath(build_dir)) |
| 820 if options.slave_name: | 818 if options.slave_name: |
| 821 slave_name = options.slave_name | 819 slave_name = options.slave_name |
| 822 else: | 820 else: |
| 823 slave_name = slave_utils.SlaveBuildName(build_dir) | 821 slave_name = slave_utils.SlaveBuildName(build_dir) |
| 824 bin_dir = os.path.join(build_dir, options.target) | 822 bin_dir = os.path.join(build_dir, options.target) |
| 825 | 823 |
| 826 # Figure out what we want for a special frame buffer directory. | 824 # Figure out what we want for a special frame buffer directory. |
| 827 special_xvfb_dir = None | 825 special_xvfb_dir = None |
| 828 if options.special_xvfb == 'auto': | 826 if options.special_xvfb == 'auto': |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 '%d new files were left in %s: Fix the tests to clean up themselves.' | 1404 '%d new files were left in %s: Fix the tests to clean up themselves.' |
| 1407 ) % ((new_temp_files - temp_files), tempfile.gettempdir()) | 1405 ) % ((new_temp_files - temp_files), tempfile.gettempdir()) |
| 1408 # TODO(maruel): Make it an error soon. Not yet since I want to iron out all | 1406 # TODO(maruel): Make it an error soon. Not yet since I want to iron out all |
| 1409 # the remaining cases before. | 1407 # the remaining cases before. |
| 1410 #result = 1 | 1408 #result = 1 |
| 1411 return result | 1409 return result |
| 1412 | 1410 |
| 1413 | 1411 |
| 1414 if '__main__' == __name__: | 1412 if '__main__' == __name__: |
| 1415 sys.exit(main()) | 1413 sys.exit(main()) |
| OLD | NEW |