| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 archive layout test results generated by buildbots. | 6 """A tool to archive layout test results generated by buildbots. |
| 7 | 7 |
| 8 Actual result files (*-actual.txt), but not results from simplified diff | 8 Actual result files (*-actual.txt), but not results from simplified diff |
| 9 tests (*-simp-actual.txt) or JS-filtered diff tests (*-jsfilt.txt), will | 9 tests (*-simp-actual.txt) or JS-filtered diff tests (*-jsfilt.txt), will |
| 10 be included in the archive. | 10 be included in the archive. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 print 'last change: %s' % last_change | 79 print 'last change: %s' % last_change |
| 80 print 'build name: %s' % build_name | 80 print 'build name: %s' % build_name |
| 81 print 'host name: %s' % socket.gethostname() | 81 print 'host name: %s' % socket.gethostname() |
| 82 | 82 |
| 83 dest_dir = os.path.join(DEST_DIR_BASE, build_name, last_change) | 83 dest_dir = os.path.join(DEST_DIR_BASE, build_name, last_change) |
| 84 if sys.platform in ['cygwin', 'win32']: | 84 if sys.platform in ['cygwin', 'win32']: |
| 85 chromium_utils.MaybeMakeDirectory(dest_dir) | 85 chromium_utils.MaybeMakeDirectory(dest_dir) |
| 86 print 'saving results to %s' % dest_dir | 86 print 'saving results to %s' % dest_dir |
| 87 chromium_utils.CopyFileToDir(zip_file, dest_dir) | 87 chromium_utils.CopyFileToDir(zip_file, dest_dir) |
| 88 elif sys.platform in ['linux', 'linux2', 'darwin']: | 88 elif sys.platform in ['linux', 'linux2', 'darwin']: |
| 89 # Files are created umask 077 by default, so make it world-readable before |
| 90 # pushing to web server. |
| 91 os.chmod(zip_file, 0644) |
| 89 chromium_utils.SshMakeDirectory(config.Archive.archive_host, dest_dir) | 92 chromium_utils.SshMakeDirectory(config.Archive.archive_host, dest_dir) |
| 90 print 'saving results to "%s" on "%s"' % (dest_dir, | 93 print 'saving results to "%s" on "%s"' % (dest_dir, |
| 91 config.Archive.archive_host) | 94 config.Archive.archive_host) |
| 92 chromium_utils.SshCopyFiles(zip_file, config.Archive.archive_host, dest_dir) | 95 chromium_utils.SshCopyFiles(zip_file, config.Archive.archive_host, dest_dir) |
| 93 else: | 96 else: |
| 94 raise chromium_utils.NotImplemented( | 97 raise chromium_utils.NotImplemented( |
| 95 'Platform "%s" is not currently supported.' % sys.platform) | 98 'Platform "%s" is not currently supported.' % sys.platform) |
| 96 | 99 |
| 97 if '__main__' == __name__: | 100 if '__main__' == __name__: |
| 98 option_parser = optparse.OptionParser() | 101 option_parser = optparse.OptionParser() |
| 99 option_parser.add_option('', '--build-dir', default='webkit', | 102 option_parser.add_option('', '--build-dir', default='webkit', |
| 100 help='path to main build directory (the parent of ' | 103 help='path to main build directory (the parent of ' |
| 101 'the Release or Debug directory)') | 104 'the Release or Debug directory)') |
| 102 option_parser.add_option('', '--results-dir', | 105 option_parser.add_option('', '--results-dir', |
| 103 help='path to layout test results, relative to ' | 106 help='path to layout test results, relative to ' |
| 104 'the build_dir') | 107 'the build_dir') |
| 105 options, args = option_parser.parse_args() | 108 options, args = option_parser.parse_args() |
| 106 sys.exit(main(options, args)) | 109 sys.exit(main(options, args)) |
| OLD | NEW |