| OLD | NEW |
| 1 #!/bin/env python | 1 #!/bin/env python |
| 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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 """Rebaselining tool that automatically produces baselines for all platforms. | 6 """Rebaselining tool that automatically produces baselines for all platforms. |
| 7 | 7 |
| 8 The script does the following for each platform specified: | 8 The script does the following for each platform specified: |
| 9 1. Compile a list of tests that need rebaselining. | 9 1. Compile a list of tests that need rebaselining. |
| 10 2. Download test result archive from buildbot for the platform. | 10 2. Download test result archive from buildbot for the platform. |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 links = self._GenerateBaselineLinks(test_basename, suffix, platform) | 660 links = self._GenerateBaselineLinks(test_basename, suffix, platform) |
| 661 if links: | 661 if links: |
| 662 row = self.HTML_TD_NOLINK % self._GetBaselineResultType(suffix) | 662 row = self.HTML_TD_NOLINK % self._GetBaselineResultType(suffix) |
| 663 row += self.HTML_TD_NOLINK % platform | 663 row += self.HTML_TD_NOLINK % platform |
| 664 row += links | 664 row += links |
| 665 logging.debug(' html row: %s', row) | 665 logging.debug(' html row: %s', row) |
| 666 | 666 |
| 667 rows.append(self.HTML_TR % row) | 667 rows.append(self.HTML_TR % row) |
| 668 | 668 |
| 669 if rows: | 669 if rows: |
| 670 test_path = os.path.join(path_utils.LayoutDataDir(), test) | 670 test_path = os.path.join(path_utils.LayoutTestsDir(), test) |
| 671 html = self.HTML_TR_TEST % (path_utils.FilenameToUri(test_path), test) | 671 html = self.HTML_TR_TEST % (path_utils.FilenameToUri(test_path), test) |
| 672 html += self.HTML_TEST_DETAIL % ' '.join(rows) | 672 html += self.HTML_TEST_DETAIL % ' '.join(rows) |
| 673 | 673 |
| 674 logging.debug(' html for test: %s', html) | 674 logging.debug(' html for test: %s', html) |
| 675 return self.HTML_TABLE_TEST % html | 675 return self.HTML_TABLE_TEST % html |
| 676 | 676 |
| 677 return '' | 677 return '' |
| 678 | 678 |
| 679 def _GetBaselineResultType(self, suffix): | 679 def _GetBaselineResultType(self, suffix): |
| 680 """Name of the baseline result type.""" | 680 """Name of the baseline result type.""" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 LogDashedString('Rebaselining result comparison started', None) | 788 LogDashedString('Rebaselining result comparison started', None) |
| 789 html_generator = HtmlGenerator(options, platforms, rebaselining_tests) | 789 html_generator = HtmlGenerator(options, platforms, rebaselining_tests) |
| 790 html_generator.GenerateHtml() | 790 html_generator.GenerateHtml() |
| 791 html_generator.ShowHtml() | 791 html_generator.ShowHtml() |
| 792 LogDashedString('Rebaselining result comparison done', None) | 792 LogDashedString('Rebaselining result comparison done', None) |
| 793 | 793 |
| 794 sys.exit(0) | 794 sys.exit(0) |
| 795 | 795 |
| 796 if '__main__' == __name__: | 796 if '__main__' == __name__: |
| 797 main() | 797 main() |
| OLD | NEW |