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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py

Issue 2902523002: Print a suggested commit description after removing flaky lines. (Closed)
Patch Set: add test, sort bugs Created 3 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 | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py
index 13817716af866782891ef5abbb00e95e3886a6fd..3e5e9b7f9ca25c9fd9cdcb33ad630367ae27b0e8 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py
@@ -1061,3 +1061,44 @@ class UpdateTestExpectationsTest(LoggingTestCase):
self.assertEqual(
FlakyTests.FLAKINESS_DASHBOARD_URL % 'test/a.html,test/b.html',
self._mock_web_browser.opened_url)
+
+ def test_suggested_commit_description(self):
+ """Tests display of the suggested commit message.
+ """
+ test_expectations_before = (
+ """# Remove this since it's passing all runs.
+ crbug.com/2222 test/a.html [ Failure Pass ]
+ # Remove this since, although there's a failure, it's not a timeout.
+ crbug.com/1111 test/b.html [ Pass Timeout ]
+ # Keep since we have both crashes and passes.
+ crbug.com/3333 test/c.html [ Crash Pass ]""")
+
+ self._define_builders({
+ 'WebKit Linux': {
+ 'port_name': 'linux-trusty',
+ 'specifiers': ['Trusty', 'Release']
+ },
+ })
+ self._port.all_build_types = ('release',)
+ self._port.all_systems = (('trusty', 'x86_64'),)
+
+ self._parse_expectations(test_expectations_before)
+ self._expectation_factory.all_results_by_builder = {
+ 'WebKit Linux': {
+ 'test/a.html': ['PASS', 'PASS', 'PASS'],
+ 'test/b.html': ['PASS', 'IMAGE', 'PASS'],
+ 'test/c.html': ['PASS', 'CRASH', 'PASS'],
+ }
+ }
+ self._flake_remover.print_suggested_commit_description()
+ self.assertLog([
+ 'INFO: Deleting line "crbug.com/2222 test/a.html [ Failure Pass ]"\n',
+ 'INFO: Deleting line "crbug.com/1111 test/b.html [ Pass Timeout ]"\n',
+ 'INFO: Suggested commit description:\n'
+ 'Remove flaky TestExpectations for tests which appear non-flaky recently.\n\n'
+ 'This change was made by the update-test-expectations script.\n\n'
+ 'Recent test results history:\n'
+ 'https://test-results.appspot.com/dashboards/flakiness_dashboard.html'
+ '#testType=webkit_layout_tests&tests=test/a.html,test/b.html\n\n'
+ 'BUG=1111,2222\n'
+ ])
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698