Diff
Modified: trunk/Tools/ChangeLog (143902 => 143903)
--- trunk/Tools/ChangeLog 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/ChangeLog 2013-02-25 12:26:14 UTC (rev 143903)
@@ -1,3 +1,33 @@
+2013-02-25 Ryosuke Niwa <[email protected]>
+
+ run-perf-tests reports wrong commit time
+ https://bugs.webkit.org/show_bug.cgi?id=110746
+
+ Reviewed by Andreas Kling.
+
+ The bug was caused by running "svn info" on a subdirectory, which returns a timestamp
+ of when the subdirectory was last modified.
+
+ Run "svn info -r <revision> <repository root>" instead. Specifying revision number is
+ insufficient since running "svn log -r <revision>" on a partial checkout only returns
+ an empty result if the revision didn't modify the subdirectory.
+
+ For git, there is no partial checkout, so we just need to pass in "-r" option to keep
+ the interface compatible with svn.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ (MockSCM.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (test_timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.timestamp_of_latest_commit):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_results_dict):
+
2013-02-25 Jochen Eisinger <[email protected]>
[chromium] move WebRuntimeFeatures configuration to TestRunner library
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -254,8 +254,8 @@
return ""
return str(match.group('svn_revision'))
- def timestamp_of_latest_commit(self, path):
- git_log = self._run_git(['log', '-1', '--date=iso', self.find_checkout_root(path)])
+ def timestamp_of_latest_commit(self, path, revision):
+ git_log = self._run_git(['log', '-1', '-r', revision, '--date=iso', self.find_checkout_root(path)])
match = re.search("^Date:\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])(\d{2})(\d{2})$", git_log, re.MULTILINE)
if not match:
return ""
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -169,7 +169,7 @@
def svn_revision(self, path):
self._subclass_must_implement()
- def timestamp_of_latest_commit(self, path):
+ def timestamp_of_latest_commit(self, path, revision):
self._subclass_must_implement()
def create_patch(self, git_commit=None, changed_files=None):
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -84,7 +84,7 @@
def svn_revision(self, path):
return '5678'
- def timestamp_of_latest_commit(self, path):
+ def timestamp_of_latest_commit(self, path, revision):
return '2013-02-01 08:48:05 +0000'
def create_patch(self, git_commit, changed_files=None):
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -1582,10 +1582,10 @@
scm = self.make_scm()
scm.find_checkout_root = lambda path: ''
scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000'
- self.assertEqual(scm.timestamp_of_latest_commit('some-path'), '2013-02-08T08:05:49Z')
+ self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-08T08:05:49Z')
scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130'
- self.assertEqual(scm.timestamp_of_latest_commit('some-path'), '2013-02-07T23:32:03Z')
+ self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-07T23:32:03Z')
scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800'
- self.assertEqual(scm.timestamp_of_latest_commit('some-path'), '2013-02-08T09:55:21Z')
+ self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-08T09:55:21Z')
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -246,9 +246,10 @@
def svn_revision(self, path):
return self.value_from_svn_info(path, 'Revision')
- def timestamp_of_latest_commit(self, path):
+ def timestamp_of_latest_commit(self, path, revision):
# We use --xml to get timestamps like 2013-02-08T08:18:04.964409Z
- info_output = Executive().run_command([self.executable_name, 'info', '--xml'], cwd=path).rstrip()
+ repository_root = self.value_from_svn_info(self.checkout_root, 'Repository Root')
+ info_output = Executive().run_command([self.executable_name, 'log', '-r', revision, '--xml', repository_root], cwd=path).rstrip()
match = re.search(r"^<date>(?P<value>.+)</date>\r?$", info_output, re.MULTILINE)
return match.group('value')
Modified: trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py (143902 => 143903)
--- trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py 2013-02-25 11:45:27 UTC (rev 143902)
+++ trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py 2013-02-25 12:26:14 UTC (rev 143903)
@@ -245,7 +245,7 @@
scm = SCMDetector(self._host.filesystem, self._host.executive).detect_scm_system(path) or self._host.scm()
revision = scm.svn_revision(path)
contents[name.lower() + '-revision'] = revision
- revisions_for_perf_webkit[name] = {'revision': str(revision), 'timestamp': scm.timestamp_of_latest_commit(path)}
+ revisions_for_perf_webkit[name] = {'revision': str(revision), 'timestamp': scm.timestamp_of_latest_commit(path, revision)}
# FIXME: Add --branch or auto-detect the branch we're in
for key, value in {'timestamp': int(timestamp), 'branch': self._default_branch, 'platform': platform,