| OLD | NEW |
| 1 # Copyright (c) 2010 Google Inc. All rights reserved. | 1 # Copyright (c) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 _log.debug("No existing baseline for %s.", test_name) | 185 _log.debug("No existing baseline for %s.", test_name) |
| 186 continue | 186 continue |
| 187 | 187 |
| 188 new_baseline = self._tool.filesystem.join( | 188 new_baseline = self._tool.filesystem.join( |
| 189 port.baseline_version_dir(), | 189 port.baseline_version_dir(), |
| 190 self._file_name_for_expected_result(test_name, suffix)) | 190 self._file_name_for_expected_result(test_name, suffix)) |
| 191 if self._tool.filesystem.exists(new_baseline): | 191 if self._tool.filesystem.exists(new_baseline): |
| 192 _log.debug("Existing baseline at %s, not copying over it.", new_
baseline) | 192 _log.debug("Existing baseline at %s, not copying over it.", new_
baseline) |
| 193 continue | 193 continue |
| 194 | 194 |
| 195 expectations = TestExpectations(port, [test_name]) | 195 generic_expectations = TestExpectations(port, tests=[test_name], inc
lude_overrides=False) |
| 196 # TODO(qyearsley): Make sure we're also skipping copying existing ba
selines in | 196 full_expectations = TestExpectations(port, tests=[test_name], includ
e_overrides=True) |
| 197 # the case where the port only runs smoke tests and the test is a sm
oke test. | 197 # TODO(qyearsley): Change Port.skips_test so that this can be simpli
fied. |
| 198 if SKIP in expectations.get_expectations(test_name): | 198 if SKIP in full_expectations.get_expectations(test_name): |
| 199 _log.debug("%s is skipped (perhaps temporarily) on %s.", test_na
me, port.name()) |
| 200 continue |
| 201 if port.skips_test(test_name, generic_expectations, full_expectation
s): |
| 199 _log.debug("%s is skipped on %s.", test_name, port.name()) | 202 _log.debug("%s is skipped on %s.", test_name, port.name()) |
| 200 continue | 203 continue |
| 201 | 204 |
| 202 old_baselines.append(old_baseline) | 205 old_baselines.append(old_baseline) |
| 203 new_baselines.append(new_baseline) | 206 new_baselines.append(new_baseline) |
| 204 | 207 |
| 205 for i in range(len(old_baselines)): | 208 for i in range(len(old_baselines)): |
| 206 old_baseline = old_baselines[i] | 209 old_baseline = old_baselines[i] |
| 207 new_baseline = new_baselines[i] | 210 new_baseline = new_baselines[i] |
| 208 | 211 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 for test in args: | 710 for test in args: |
| 708 if test not in test_prefix_list: | 711 if test not in test_prefix_list: |
| 709 test_prefix_list[test] = {} | 712 test_prefix_list[test] = {} |
| 710 build = Build(builder) | 713 build = Build(builder) |
| 711 test_prefix_list[test][build] = suffixes_to_update | 714 test_prefix_list[test][build] = suffixes_to_update |
| 712 | 715 |
| 713 if options.verbose: | 716 if options.verbose: |
| 714 _log.debug("rebaseline-json: " + str(test_prefix_list)) | 717 _log.debug("rebaseline-json: " + str(test_prefix_list)) |
| 715 | 718 |
| 716 self.rebaseline(options, test_prefix_list) | 719 self.rebaseline(options, test_prefix_list) |
| OLD | NEW |