Commit efac3d1c authored by Quinten Yearsley's avatar Quinten Yearsley Committed by Commit Bot

Remove auto-rebaseline and the NeedsRebaseline keyword.

Bug: 692811
Change-Id: Ic1a061020c1dc502655646c7a6e3ae80aee14535
Reviewed-on: https://chromium-review.googlesource.com/564681Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485453}
parent 5946acdc
......@@ -285,7 +285,6 @@ class Manager(object):
def _test_is_expected_missing(self, test_file):
expectations = self._expectations.model().get_expectations(test_file)
return (test_expectations.MISSING in expectations or
test_expectations.NEEDS_REBASELINE in expectations or
test_expectations.NEEDS_MANUAL_REBASELINE in expectations)
def _test_is_slow(self, test_file):
......
......@@ -118,12 +118,7 @@ class LintTest(unittest.TestCase):
logger, handler = lint_test_expectations.set_up_logging(logging_stream)
try:
res = lint_test_expectations.lint(host, options)
self.assertEqual(
res,
['/test.checkout/LayoutTests/TestExpectations: '
'/test.checkout/LayoutTests/TestExpectations:5 '
'NeedsRebaseline is deprecated; see https://crbug.com/692811 '
'failures/expected/needsrebaseline.html'])
self.assertEqual(res, [])
finally:
lint_test_expectations.tear_down_logging(logger, handler)
......
......@@ -44,7 +44,7 @@ _log = logging.getLogger(__name__)
# FIXME: range() starts with 0 which makes if expectation checks harder
# as PASS is 0.
(PASS, FAIL, TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO, TIMEOUT, CRASH, LEAK, SKIP, WONTFIX,
SLOW, REBASELINE, NEEDS_REBASELINE, NEEDS_MANUAL_REBASELINE, MISSING, FLAKY, NOW, NONE) = range(19)
SLOW, REBASELINE, NEEDS_REBASELINE_UNUSED, NEEDS_MANUAL_REBASELINE, MISSING, FLAKY, NOW, NONE) = range(19)
# FIXME: Perhaps these two routines should be part of the Port instead?
BASELINE_SUFFIX_LIST = ('png', 'wav', 'txt')
......@@ -56,7 +56,6 @@ V8_BUG_PREFIX = 'code.google.com/p/v8/issues/detail?id='
NAMED_BUG_PREFIX = 'Bug('
MISSING_KEYWORD = 'Missing'
NEEDS_REBASELINE_KEYWORD = 'NeedsRebaseline'
NEEDS_MANUAL_REBASELINE_KEYWORD = 'NeedsManualRebaseline'
......@@ -79,7 +78,6 @@ class TestExpectationParser(object):
# FIXME: Rename these to *_KEYWORD as in MISSING_KEYWORD above, but make
# the case studdly-caps to match the actual file contents.
REBASELINE_MODIFIER = 'rebaseline'
NEEDS_REBASELINE_MODIFIER = 'needsrebaseline'
NEEDS_MANUAL_REBASELINE_MODIFIER = 'needsmanualrebaseline'
PASS_EXPECTATION = 'pass'
SKIP_MODIFIER = 'skip'
......@@ -170,20 +168,16 @@ class TestExpectationParser(object):
if self.REBASELINE_MODIFIER in expectations:
expectation_line.warnings.append('REBASELINE should only be used for running rebaseline.py. Cannot be checked in.')
if self.NEEDS_REBASELINE_MODIFIER in expectations:
expectation_line.warnings.append('NeedsRebaseline is deprecated; see https://crbug.com/692811')
if self.NEEDS_REBASELINE_MODIFIER in expectations or self.NEEDS_MANUAL_REBASELINE_MODIFIER in expectations:
if self.NEEDS_MANUAL_REBASELINE_MODIFIER in expectations:
for test in expectation_line.matching_tests:
if self._port.reference_files(test):
text_expected_filename = self._port.expected_filename(test, '.txt')
if not self._port.host.filesystem.exists(text_expected_filename):
expectation_line.warnings.append(
'A reftest without text expectation cannot be marked as NeedsRebaseline/NeedsManualRebaseline')
'A reftest without text expectation cannot be marked as NeedsManualRebaseline')
specifiers = [specifier.lower() for specifier in expectation_line.specifiers]
if (self.REBASELINE_MODIFIER in expectations or self.NEEDS_REBASELINE_MODIFIER in expectations) and (
'debug' in specifiers or 'release' in specifiers):
if self.REBASELINE_MODIFIER in expectations and ('debug' in specifiers or 'release' in specifiers):
expectation_line.warnings.append('A test cannot be rebaselined for Debug/Release.')
def _parse_expectations(self, expectation_line):
......@@ -303,7 +297,6 @@ class TestExpectationLine(object):
MISSING_KEYWORD: 'MISSING',
'Pass': 'PASS',
'Rebaseline': 'REBASELINE',
NEEDS_REBASELINE_KEYWORD: 'NEEDSREBASELINE',
NEEDS_MANUAL_REBASELINE_KEYWORD: 'NEEDSMANUALREBASELINE',
'Skip': 'SKIP',
'Slow': 'SLOW',
......@@ -445,8 +438,8 @@ class TestExpectationLine(object):
if 'MISSING' in expectations:
warnings.append(
'"Missing" expectations are not allowed; either download new baselines '
'(see https://goo.gl/SHVYrZ) or use "NeedsRebaseline" expectations.')
'"Missing" expectations are not allowed; download new baselines '
'(see https://goo.gl/SHVYrZ), or as a fallback, use "NeedsManualRebaseline".')
expectation_line.bugs = bugs
expectation_line.specifiers = specifiers
......@@ -885,7 +878,6 @@ class TestExpectations(object):
'leak': LEAK,
'missing': MISSING,
TestExpectationParser.SKIP_MODIFIER: SKIP,
TestExpectationParser.NEEDS_REBASELINE_MODIFIER: NEEDS_REBASELINE,
TestExpectationParser.NEEDS_MANUAL_REBASELINE_MODIFIER: NEEDS_MANUAL_REBASELINE,
TestExpectationParser.WONTFIX_MODIFIER: WONTFIX,
TestExpectationParser.SLOW_MODIFIER: SLOW,
......@@ -943,10 +935,9 @@ class TestExpectations(object):
if result in expected_results:
return True
if result in (PASS, TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO, MISSING) and (
NEEDS_REBASELINE in expected_results or NEEDS_MANUAL_REBASELINE in expected_results):
if result in (PASS, TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO, MISSING) and NEEDS_MANUAL_REBASELINE in expected_results:
return True
if result in (TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO) and (FAIL in expected_results):
if result in (TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO) and FAIL in expected_results:
return True
if result == MISSING and test_needs_rebaselining:
return True
......@@ -1060,9 +1051,6 @@ class TestExpectations(object):
def expectations(self):
return self._expectations
def get_needs_rebaseline_failures(self):
return self._model.get_test_set(NEEDS_REBASELINE)
def get_rebaselining_failures(self):
return self._model.get_test_set(REBASELINE)
......
......@@ -204,7 +204,6 @@ class SummarizedResultsTest(unittest.TestCase):
'MISSING': 0,
'TEXT': 1,
'IMAGE': 1,
'NEEDSREBASELINE': 0,
'NEEDSMANUALREBASELINE': 0,
'PASS': 0,
'REBASELINE': 0,
......@@ -226,7 +225,6 @@ class SummarizedResultsTest(unittest.TestCase):
'MISSING': 0,
'TEXT': 0,
'IMAGE': 0,
'NEEDSREBASELINE': 0,
'NEEDSMANUALREBASELINE': 0,
'PASS': 1,
'REBASELINE': 0,
......@@ -248,7 +246,6 @@ class SummarizedResultsTest(unittest.TestCase):
'MISSING': 0,
'TEXT': 0,
'IMAGE': 0,
'NEEDSREBASELINE': 0,
'NEEDSMANUALREBASELINE': 0,
'PASS': 5,
'REBASELINE': 0,
......
......@@ -110,9 +110,9 @@ class TestList(object):
#
# These numbers may need to be updated whenever we add or delete tests. This includes virtual tests.
#
TOTAL_TESTS = 108
TOTAL_TESTS = 106
TOTAL_WONTFIX = 3
TOTAL_SKIPS = 22 + TOTAL_WONTFIX
TOTAL_SKIPS = 21 + TOTAL_WONTFIX
TOTAL_CRASHES = 76
UNEXPECTED_PASSES = 1
......@@ -126,7 +126,6 @@ def unit_test_list():
tests.add('failures/expected/device_failure.html', device_failure=True)
tests.add('failures/expected/timeout.html', timeout=True)
tests.add('failures/expected/leak.html', leak=True)
tests.add('failures/expected/needsrebaseline.html', actual_text='needsrebaseline text')
tests.add('failures/expected/needsmanualrebaseline.html', actual_text='needsmanualrebaseline text')
tests.add('failures/expected/image.html',
actual_image='image_fail-pngtEXtchecksum\x00checksum_fail',
......@@ -281,7 +280,6 @@ def add_unit_tests_to_mock_filesystem(filesystem):
Bug(test) failures/expected/crash.html [ Crash ]
Bug(test) failures/expected/crash_then_text.html [ Failure ]
Bug(test) failures/expected/image.html [ Failure ]
Bug(test) failures/expected/needsrebaseline.html [ NeedsRebaseline ]
Bug(test) failures/expected/needsmanualrebaseline.html [ NeedsManualRebaseline ]
Bug(test) failures/expected/audio.html [ Failure ]
Bug(test) failures/expected/image_checksum.html [ Failure ]
......
......@@ -95,7 +95,7 @@ class RemoveFlakesOMatic(object):
if len(expectations) < 2:
return False
# Don't check lines that have expectations like NeedsRebaseline or Skip.
# Don't check lines that have expectations like Skip.
if self._has_unstrippable_expectations(expectations):
return False
......@@ -190,9 +190,12 @@ class RemoveFlakesOMatic(object):
True if at least one of the expectations is unstrippable. False
otherwise.
"""
unstrippable_expectations = ('REBASELINE', 'NEEDSREBASELINE',
'NEEDSMANUALREBASELINE', 'SLOW',
'SKIP')
unstrippable_expectations = (
'NEEDSMANUALREBASELINE',
'REBASELINE',
'SKIP',
'SLOW',
)
return any(s in expectations for s in unstrippable_expectations)
def _get_builder_results_by_path(self):
......
......@@ -167,8 +167,7 @@ class UpdateTestExpectationsTest(LoggingTestCase):
Bug(test) test/b.html [ Timeout ]
Bug(test) test/c.html [ Failure Timeout ]
Bug(test) test/d.html [ Rebaseline ]
Bug(test) test/e.html [ NeedsManualRebaseline ]
Bug(test) test/f.html [ NeedsRebaseline ]"""
Bug(test) test/e.html [ NeedsManualRebaseline ]"""
self._define_builders({
'WebKit Linux Trusty': {
......@@ -265,9 +264,8 @@ class UpdateTestExpectationsTest(LoggingTestCase):
test_expectations_before = """
# Even though the results show all passing, none of the
# expectations are flaky so we shouldn't remove any.
Bug(test) test/a.html [ Failure NeedsRebaseline Pass ]
Bug(test) test/b.html [ Failure Pass Rebaseline ]
Bug(test) test/c.html [ Failure NeedsManualRebaseline Pass ]"""
Bug(test) test/a.html [ Failure Pass Rebaseline ]
Bug(test) test/b.html [ Failure NeedsManualRebaseline Pass ]"""
self._define_builders({
'WebKit Linux Trusty': {
......@@ -283,7 +281,6 @@ class UpdateTestExpectationsTest(LoggingTestCase):
'WebKit Linux Trusty': {
'test/a.html': ['PASS', 'PASS'],
'test/b.html': ['PASS', 'PASS'],
'test/c.html': ['PASS', 'PASS']
}
}
updated_expectations = (
......
......@@ -339,9 +339,7 @@ class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
# This is so we remove lines for builders that skip this test, e.g. Android skips most
# tests and we don't want to leave stray [ Android ] lines in TestExpectations..
# This is only necessary for "webkit-patch rebaseline" and for rebaselining expected
# failures from garden-o-matic. rebaseline-expectations and auto-rebaseline will always
# pass the exact set of ports to rebaseline.
# This is only necessary for "webkit-patch rebaseline".
for port_name in self._tool.port_factory.all_port_names():
port = self._tool.port_factory.get(port_name)
generic_expectations = TestExpectations(port, tests=tests, include_overrides=False)
......
......@@ -173,7 +173,7 @@ class TestRebaseline(BaseTestCase):
'tests': {
'userscripts': {
'first-test.html': {
'expected': 'NEEDSREBASELINE',
'expected': 'REBASELINE',
'actual': 'PASS'
}
}
......
......@@ -42,7 +42,6 @@ import sys
from webkitpy.common.host import Host
from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines
from webkitpy.tool.commands.auto_rebaseline import AutoRebaseline
from webkitpy.tool.commands.command import HelpPrintingOptionParser
from webkitpy.tool.commands.copy_existing_baselines import CopyExistingBaselines
from webkitpy.tool.commands.flaky_tests import FlakyTests
......@@ -81,7 +80,6 @@ class WebKitPatch(Host):
self._path = path
self.commands = [
AnalyzeBaselines(),
AutoRebaseline(),
CopyExistingBaselines(),
CrashLog(),
FlakyTests(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment