Refactor TestExpectationsParser in preparation for caching the results
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 20:40:18 +0000 (20:40 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 20:40:18 +0000 (20:40 +0000)
commit2d7be065372d7b98a9105ef76eec913b26723ebd
tree6b90513f7e6dd272934eedc2d88d2e59c139e450
parent5d2d9a2637e8b96370a0667c448ce151719980d4
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
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/controllers/test_expectations_editor_unittest.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
Tools/Scripts/webkitpy/tool/commands/expectations.py
Tools/Scripts/webkitpy/tool/servers/gardeningserver.py