| Index: media/tools/layout_tests/test_expectations_history.py
|
| diff --git a/media/tools/layout_tests/test_expectations_history.py b/media/tools/layout_tests/test_expectations_history.py
|
| index 3799db7bd7f414ed711ed642f1a4b2a28ca1097c..6dbd9e959c6d18f763a4794fe08d5bb4a182c43f 100644
|
| --- a/media/tools/layout_tests/test_expectations_history.py
|
| +++ b/media/tools/layout_tests/test_expectations_history.py
|
| @@ -16,9 +16,11 @@ import pysvn
|
| # TODO(imasaki): support multiple test expectation files.
|
| DEFAULT_TEST_EXPECTATION_LOCATION = (
|
| 'http://svn.webkit.org/repository/webkit/trunk/'
|
| + 'LayoutTests/platform/chromium/TestExpectations')
|
| +LEGACY_TEST_EXPECTATION_LOCATION = (
|
| + 'http://svn.webkit.org/repository/webkit/trunk/'
|
| 'LayoutTests/platform/chromium/test_expectations.txt')
|
|
|
| -
|
| class TestExpectationsHistory(object):
|
| """A class to represent history of the test expectation file.
|
|
|
| @@ -57,7 +59,7 @@ class TestExpectationsHistory(object):
|
| # PySVN.log() (http://pysvn.tigris.org/docs/pysvn_prog_ref.html
|
| # #pysvn_client_log) returns the log messages (including revision
|
| # number in chronological order).
|
| - logs = client.log('tmp/test_expectations.txt',
|
| + logs = client.log('tmp/TestExpectations',
|
| revision_start=pysvn.Revision(
|
| pysvn.opt_revision_kind.date, start),
|
| revision_end=pysvn.Revision(
|
| @@ -69,7 +71,7 @@ class TestExpectationsHistory(object):
|
| (datetime.fromtimestamp(start) - (
|
| timedelta(days=gobackdays))).timetuple())
|
| logs_before_time_period = (
|
| - client.log('tmp/test_expectations.txt',
|
| + client.log('tmp/TestExpectations',
|
| revision_start=pysvn.Revision(
|
| pysvn.opt_revision_kind.date, goback_start),
|
| revision_end=pysvn.Revision(
|
| @@ -84,9 +86,20 @@ class TestExpectationsHistory(object):
|
| old_rev = logs[i].revision.number
|
| new_rev = logs[i + 1].revision.number
|
| # Parsing the actual diff.
|
| - text = client.diff('/tmp', 'tmp/test_expectations.txt',
|
| +
|
| + # test_expectations.txt was renamed to TestExpectations at r119317.
|
| + new_path = DEFAULT_TEST_EXPECTATION_LOCATION
|
| + if new_rev < 119317:
|
| + new_path = LEGACY_TEST_EXPECTATION_LOCATION
|
| + old_path = DEFAULT_TEST_EXPECTATION_LOCATION
|
| + if old_rev < 119317:
|
| + old_path = LEGACY_TEST_EXPECTATION_LOCATION
|
| +
|
| + text = client.diff('/tmp',
|
| + url_or_path=old_path,
|
| revision1=pysvn.Revision(
|
| pysvn.opt_revision_kind.number, old_rev),
|
| + url_or_path2=new_path,
|
| revision2=pysvn.Revision(
|
| pysvn.opt_revision_kind.number, new_rev))
|
| lines = text.split('\n')
|
|
|