Title: [114014] trunk/Tools
- Revision
- 114014
- Author
- [email protected]
- Date
- 2012-04-12 12:19:13 -0700 (Thu, 12 Apr 2012)
Log Message
test-webkitpy fails on metered_stream_unittest for non-US West Coast Time Zones
https://bugs.webkit.org/show_bug.cgi?id=83583
Reviewed by Philippe Normand
Updated the unit test to ignore the hours and minutes of the
localtime for time(0), since we can't easily guarantee which
timezone we're in or what timezone rules were in effect on
1/1/1970; this should be mostly fine since we can trust that
time.localtime() will work, although there is the possibility
that we'll screw up the time formatting of which field is the
hours and which is the minutes.
* Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
(VerboseTest):
(VerboseTest.test_basic):
(VerboseTest.test_log_after_update):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (114013 => 114014)
--- trunk/Tools/ChangeLog 2012-04-12 19:16:49 UTC (rev 114013)
+++ trunk/Tools/ChangeLog 2012-04-12 19:19:13 UTC (rev 114014)
@@ -1,3 +1,23 @@
+2012-04-12 Dirk Pranke <[email protected]>
+
+ test-webkitpy fails on metered_stream_unittest for non-US West Coast Time Zones
+ https://bugs.webkit.org/show_bug.cgi?id=83583
+
+ Reviewed by Philippe Normand
+
+ Updated the unit test to ignore the hours and minutes of the
+ localtime for time(0), since we can't easily guarantee which
+ timezone we're in or what timezone rules were in effect on
+ 1/1/1970; this should be mostly fine since we can trust that
+ time.localtime() will work, although there is the possibility
+ that we'll screw up the time formatting of which field is the
+ hours and which is the minutes.
+
+ * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
+ (VerboseTest):
+ (VerboseTest.test_basic):
+ (VerboseTest.test_log_after_update):
+
2012-04-12 Dominik Rottsches <[email protected]>
Add an EFL Debug Buildbot to the master configuration
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py (114013 => 114014)
--- trunk/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py 2012-04-12 19:16:49 UTC (rev 114013)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py 2012-04-12 19:19:13 UTC (rev 114014)
@@ -131,16 +131,23 @@
def test_basic(self):
buflist = self._basic([0, 1, 2.1, 13, 14.1234])
- self.assertEquals(buflist, ['16:00:00.000 8675 foo\n', '16:00:01.000 8675 bar\n', '16:00:13.000 8675 baz 2\n', '16:00:14.123 8675 done\n'])
+ # We don't bother to match the hours and minutes of the timestamp since
+ # the local timezone can vary and we can't set that portably and easily.
+ self.assertTrue(re.match('\d\d:\d\d:00.000 8675 foo\n', buflist[0]))
+ self.assertTrue(re.match('\d\d:\d\d:01.000 8675 bar\n', buflist[1]))
+ self.assertTrue(re.match('\d\d:\d\d:13.000 8675 baz 2\n', buflist[2]))
+ self.assertTrue(re.match('\d\d:\d\d:14.123 8675 done\n', buflist[3]))
+ self.assertEquals(len(buflist), 4)
def test_log_after_update(self):
buflist = self._log_after_update()
- self.assertEquals(buflist[0], '16:00:00.000 8675 foo\n')
+ self.assertTrue(re.match('\d\d:\d\d:00.000 8675 foo\n', buflist[0]))
# The second argument should have a real timestamp and pid, so we just check the format.
- self.assertEquals(len(buflist), 2)
self.assertTrue(re.match('\d\d:\d\d:\d\d.\d\d\d \d+ bar\n', buflist[1]))
+ self.assertEquals(len(buflist), 2)
+
def test_log_args(self):
self.logger.info('foo %s %d', 'bar', 2)
self.assertEquals(len(self.buflist), 1)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes