| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 # Extract the build name of this slave (e.g., 'chrome-release') from its | 74 # Extract the build name of this slave (e.g., 'chrome-release') from its |
| 75 # configuration file. | 75 # configuration file. |
| 76 build_name = slave_utils.SlaveBuildName(chrome_dir) | 76 build_name = slave_utils.SlaveBuildName(chrome_dir) |
| 77 | 77 |
| 78 last_change = str(slave_utils.SubversionRevision(chrome_dir)) | 78 last_change = str(slave_utils.SubversionRevision(chrome_dir)) |
| 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 chromium_utils.MaybeMakeDirectory(dest_dir) | 84 if sys.platform in ['cygwin', 'win32']: |
| 85 print 'saving results to %s' % dest_dir | 85 chromium_utils.MaybeMakeDirectory(dest_dir) |
| 86 chromium_utils.CopyFileToDir(zip_file, dest_dir) | 86 print 'saving results to %s' % dest_dir |
| 87 chromium_utils.CopyFileToDir(zip_file, dest_dir) |
| 88 elif sys.platform in ['linux', 'linux2', 'darwin']: |
| 89 chromium_utils.SshMakeDirectory(config.Archive.archive_host, dest_dir) |
| 90 print 'saving results to "%s" on "%s"' % (dest_dir, |
| 91 config.Archive.archive_host) |
| 92 chromium_utils.SshCopyFiles(zip_file, config.Archive.archive_host, dest_dir) |
| 87 | 93 |
| 88 if '__main__' == __name__: | 94 if '__main__' == __name__: |
| 89 option_parser = optparse.OptionParser() | 95 option_parser = optparse.OptionParser() |
| 90 option_parser.add_option('', '--build-dir', default='webkit', | 96 option_parser.add_option('', '--build-dir', default='webkit', |
| 91 help='path to main build directory (the parent of ' | 97 help='path to main build directory (the parent of ' |
| 92 'the Release or Debug directory)') | 98 'the Release or Debug directory)') |
| 93 option_parser.add_option('', '--results-dir', | 99 option_parser.add_option('', '--results-dir', |
| 94 help='path to layout test results, relative to ' | 100 help='path to layout test results, relative to ' |
| 95 'the build_dir') | 101 'the build_dir') |
| 96 options, args = option_parser.parse_args() | 102 options, args = option_parser.parse_args() |
| 97 sys.exit(main(options, args)) | 103 sys.exit(main(options, args)) |
| OLD | NEW |