Refactor TestExpectationsParser in preparation for caching the results
https://bugs.webkit.org/show_bug.cgi?id=76669
Reviewed by Dimitri Glazkov.
Make everything private expect for the parse method.
Eventually, we'll need the expectations lines to not be modified
outside of TestExpectationsParser so we can cache the results.
This makes check-webkit-style of the chromium test_expectations.txt file
go from ~17 seconds to ~12 seconds on my Mac Pro.
This patch is just a refactor in preparation, so no new tests.
* Scripts/webkitpy/layout_tests/controllers/test_expectations_editor_unittest.py:
(TestExpectationEditorTests.make_parsed_expectation_lines):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser.parse):
(TestExpectationParser):
(TestExpectationParser._parse_line):
(TestExpectationParser._tokenize):
(TestExpectationParser._tokenize_list):
(TestExpectationsModel._clear_expectations_for_test):
(TestExpectations.__init__):
(TestExpectations._add_expectations):
(TestExpectations._add_skipped_tests):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(TestExpectationParserTests.test_tokenize_blank):
(TestExpectationParserTests.test_tokenize_missing_colon):
(TestExpectationParserTests.test_tokenize_extra_colon):
(TestExpectationParserTests.test_tokenize_empty_comment):
(TestExpectationParserTests.test_tokenize_comment):
(TestExpectationParserTests.test_tokenize_missing_equal):
(TestExpectationParserTests.test_tokenize_extra_equal):
(TestExpectationParserTests.test_tokenize_valid):
(TestExpectationParserTests.test_tokenize_valid_with_comment):
(TestExpectationParserTests.test_tokenize_valid_with_multiple_modifiers):
(TestExpectationParserTests.test_parse_empty_string):
(TestExpectationSerializerTests.assert_round_trip):
(TestExpectationSerializerTests.assert_list_round_trip):
* Scripts/webkitpy/tool/commands/expectations.py:
(OptimizeExpectations.execute):
* Scripts/webkitpy/tool/servers/gardeningserver.py:
(GardeningExpectationsUpdater.update_expectations):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105535
268f45cc-cd09-0410-ab3c-
d52691b4dbfc