Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: media/tools/layout_tests/test_expectations_history.py

Issue 10501010: Update layout_tests tool in media/tools and PRESUBMIT.py per test_expectations.txt renames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/tools/layout_tests/test_expectations.py ('k') | webkit/tools/layout_tests/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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')
« no previous file with comments | « media/tools/layout_tests/test_expectations.py ('k') | webkit/tools/layout_tests/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698