| OLD | NEW |
| 1 # Copyright (c) 2011 Google Inc. All rights reserved. | 1 # Copyright (c) 2011 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 reviewer_emails = options.reviewers.split(',') | 91 reviewer_emails = options.reviewers.split(',') |
| 92 else: | 92 else: |
| 93 reviewer_emails = sheriff_calendar.current_gardener_emails() | 93 reviewer_emails = sheriff_calendar.current_gardener_emails() |
| 94 if not reviewer_emails: | 94 if not reviewer_emails: |
| 95 print "No gardener, and --reviewers not specified, not bothering
." | 95 print "No gardener, and --reviewers not specified, not bothering
." |
| 96 return 1 | 96 return 1 |
| 97 | 97 |
| 98 commit_message = self.COMMIT_MESSAGE % ','.join(reviewer_emails) | 98 commit_message = self.COMMIT_MESSAGE % ','.join(reviewer_emails) |
| 99 git_cmd = ['git', 'commit', '-m', commit_message, | 99 git_cmd = ['git', 'commit', '-m', commit_message, |
| 100 tool.filesystem.join(tool.scm().checkout_root, flaky_tests_path)] | 100 tool.filesystem.join(tool.scm().checkout_root, flaky_tests_path)] |
| 101 tool.executive.run_and_throw_if_fail(git_cmd) | 101 tool.executive.run_command(git_cmd) |
| 102 | 102 |
| 103 git_cmd = ['git', 'cl', 'upload', '--send-mail', '-f', | 103 git_cmd = ['git', 'cl', 'upload', '--send-mail', '-f', |
| 104 '--cc', ','.join(self.ALWAYS_CC)] | 104 '--cc', ','.join(self.ALWAYS_CC)] |
| 105 tool.executive.run_and_throw_if_fail(git_cmd) | 105 tool.executive.run_command(git_cmd) |
| 106 | 106 |
| 107 def execute(self, options, args, tool): | 107 def execute(self, options, args, tool): |
| 108 factory = self.expectations_factory() | 108 factory = self.expectations_factory() |
| 109 | 109 |
| 110 # FIXME: WebKit Linux 32 and WebKit Linux have the same specifiers; | 110 # FIXME: WebKit Linux 32 and WebKit Linux have the same specifiers; |
| 111 # if we include both of them, we'll get duplicate lines. Ideally | 111 # if we include both of them, we'll get duplicate lines. Ideally |
| 112 # Linux 32 would have unique speicifiers. | 112 # Linux 32 would have unique speicifiers. |
| 113 most_builders = builders.all_builder_names() | 113 most_builders = builders.all_builder_names() |
| 114 if 'WebKit Linux 32' in most_builders: | 114 if 'WebKit Linux 32' in most_builders: |
| 115 most_builders.remove('WebKit Linux 32') | 115 most_builders.remove('WebKit Linux 32') |
| (...skipping 10 matching lines...) Expand all Loading... |
| 126 # in existing TestExpectations. We could certainly load existing TestExp
ecations | 126 # in existing TestExpectations. We could certainly load existing TestExp
ecations |
| 127 # and filter accordingly, or update existing TestExpectations instead of
FlakyTests. | 127 # and filter accordingly, or update existing TestExpectations instead of
FlakyTests. |
| 128 flaky_tests_path = fs.join(port.layout_tests_dir(), 'FlakyTests') | 128 flaky_tests_path = fs.join(port.layout_tests_dir(), 'FlakyTests') |
| 129 flaky_tests_contents = self.FLAKY_TEST_CONTENTS % TestExpectations.list_
to_string(lines) | 129 flaky_tests_contents = self.FLAKY_TEST_CONTENTS % TestExpectations.list_
to_string(lines) |
| 130 fs.write_text_file(flaky_tests_path, flaky_tests_contents) | 130 fs.write_text_file(flaky_tests_path, flaky_tests_contents) |
| 131 print "Updated %s" % flaky_tests_path | 131 print "Updated %s" % flaky_tests_path |
| 132 | 132 |
| 133 if options.upload: | 133 if options.upload: |
| 134 return self._commit_and_upload(tool, options) | 134 return self._commit_and_upload(tool, options) |
| 135 | 135 |
| OLD | NEW |