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. |