Title: [179610] trunk/Tools
- Revision
- 179610
- Author
- [email protected]
- Date
- 2015-02-04 10:07:06 -0800 (Wed, 04 Feb 2015)
Log Message
[webkitpy] Add platform specific Skipped file mechanism for performance tests
https://bugs.webkit.org/show_bug.cgi?id=141152
Reviewed by Csaba Osztrogonác.
Support a test-expectation-like syntax in performance tests' skipped files.
e.g. [Mac] Parsed/BadTest.html will skip Parsed/BadTest.html on Mac ports.
* Scripts/webkitpy/port/base.py:
(Port.skipped_perf_tests): Implemented the syntax support by a regular _expression_.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_skipped_perf_tests): Test the new syntax.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (179609 => 179610)
--- trunk/Tools/ChangeLog 2015-02-04 18:00:05 UTC (rev 179609)
+++ trunk/Tools/ChangeLog 2015-02-04 18:07:06 UTC (rev 179610)
@@ -1,3 +1,19 @@
+2015-02-03 Ryosuke Niwa <[email protected]>
+
+ [webkitpy] Add platform specific Skipped file mechanism for performance tests
+ https://bugs.webkit.org/show_bug.cgi?id=141152
+
+ Reviewed by Csaba Osztrogonác.
+
+ Support a test-expectation-like syntax in performance tests' skipped files.
+ e.g. [Mac] Parsed/BadTest.html will skip Parsed/BadTest.html on Mac ports.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port.skipped_perf_tests): Implemented the syntax support by a regular _expression_.
+
+ * Scripts/webkitpy/port/base_unittest.py:
+ (PortTest.test_skipped_perf_tests): Test the new syntax.
+
2015-02-04 Alexey Proskuryakov <[email protected]>
When tests fail on leaks bot so much that there are no leaks detected, dashboard erroneously shows green
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (179609 => 179610)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2015-02-04 18:00:05 UTC (rev 179609)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2015-02-04 18:07:06 UTC (rev 179610)
@@ -699,8 +699,25 @@
@memoized
def skipped_perf_tests(self):
- return self._expectations_from_skipped_files([self.perf_tests_dir()])
+ filename = self._filesystem.join(self.perf_tests_dir(), "Skipped")
+ if not self._filesystem.exists(filename):
+ _log.debug("Skipped does not exist: %s" % filename)
+ return []
+ skipped_file_contents = self._filesystem.read_text_file(filename)
+ tests_to_skip = []
+ for line_number, line in enumerate(skipped_file_contents.split('\n')):
+ match = re.match(r'^\s*(\[(?P<platforms>[\w ]*?)\])?\s*(?P<test>[\w\-\/\.]+?)?\s*(?P<comment>\#.*)?$', line)
+ if not match:
+ _log.error("Syntax error at line %d in %s: %s" % (line_number + 1, filename, line))
+ else:
+ platform_names = filter(lambda token: token, match.group('platforms').lower().split(' ')) if match.group('platforms') else []
+ test_name = match.group('test')
+ if test_name and (not platform_names or self.port_name in platform_names or self._name in platform_names):
+ tests_to_skip.append(test_name)
+
+ return tests_to_skip
+
def skips_perf_test(self, test_name):
for test_or_category in self.skipped_perf_tests():
if test_or_category == test_name:
Modified: trunk/Tools/Scripts/webkitpy/port/base_unittest.py (179609 => 179610)
--- trunk/Tools/Scripts/webkitpy/port/base_unittest.py 2015-02-04 18:00:05 UTC (rev 179609)
+++ trunk/Tools/Scripts/webkitpy/port/base_unittest.py 2015-02-04 18:07:06 UTC (rev 179610)
@@ -147,8 +147,8 @@
add_text_file('inspector', 'test2.html')
add_text_file('inspector/resources', 'resource_file.html')
add_text_file('unsupported', 'unsupported_test2.html')
- add_text_file('', 'Skipped', '\n'.join(['Layout', '', 'SunSpider', 'Supported/some-test.html']))
- self.assertEqual(port.skipped_perf_tests(), ['Layout', 'SunSpider', 'Supported/some-test.html'])
+ add_text_file('', 'Skipped', '\n'.join(['Layout', '', 'SunSpider', 'Supported/some-test.html', '[ExoticPort] UnskippedTest.html', '[baseport] SkippedTest.html']))
+ self.assertEqual(port.skipped_perf_tests(), ['Layout', 'SunSpider', 'Supported/some-test.html', 'SkippedTest.html'])
def test_get_option__set(self):
options, args = optparse.OptionParser().parse_args([])
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes