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

Unified Diff: Tools/Scripts/webkitpy/tool/commands/flakytests.py

Issue 301853003: Make update-flaky-tests to work again and support all bots (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « LayoutTests/FlakyTests ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/tool/commands/flakytests.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/flakytests.py b/Tools/Scripts/webkitpy/tool/commands/flakytests.py
index 67baf85b1b5c8a74bc44ef881f2ed2f6acd17285..9f5009c063926e3688a7e704f5ae28ccd47cb9a2 100644
--- a/Tools/Scripts/webkitpy/tool/commands/flakytests.py
+++ b/Tools/Scripts/webkitpy/tool/commands/flakytests.py
@@ -30,6 +30,7 @@ import optparse
from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestExpectationsFactory
from webkitpy.layout_tests.models.test_expectations import TestExpectationParser, TestExpectationsModel, TestExpectations
+from webkitpy.common.net import sheriff_calendar
class FlakyTests(AbstractDeclarativeCommand):
@@ -63,6 +64,7 @@ class FlakyTests(AbstractDeclarativeCommand):
# and filter accordingly, or update existing TestExpectations instead of FlakyTests.
with open(flaky_tests_path, 'w') as flake_file:
flake_file.write(TestExpectations.list_to_string(lines))
+ print "Updated %s" % flaky_tests_path
if not options.upload:
return 0
@@ -73,10 +75,24 @@ class FlakyTests(AbstractDeclarativeCommand):
print "%s is not changed, not uploading." % flaky_tests_path
return 0
- commit_message = "Update FlakyTests"
- git_cmd = ['git', 'commit', '-m', commit_message, flaky_tests_path]
- tool.executive.run_command(git_cmd)
+ sheriff_emails = sheriff_calendar.current_gardener_emails()
+ if not sheriff_emails:
+ print "No gardener, not bothering."
+ sheriff_emails = ['eseidel@chromium.org']
+ #return 1
- git_cmd = ['git', 'cl', 'upload', '--use-commit-queue', '--send-mail']
- tool.executive.run_command(git_cmd)
+ commit_message = """Update FlakyTests to match current flakiness dashboard results
+
+Automatically generated using:
+webkit-patch update-flaky-tests
+
+R=%s
+""" % ','.join(sheriff_emails)
+
+ git_cmd = ['git', 'commit', '-m', commit_message,
+ fs.join(tool.scm().checkout_root, flaky_tests_path)]
+ tool.executive.run_and_throw_if_fail(git_cmd)
+
+ git_cmd = ['git', 'cl', 'upload', '--send-mail']
+ tool.executive.run_and_throw_if_fail(git_cmd)
# If there are changes to git, upload.
« no previous file with comments | « LayoutTests/FlakyTests ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698