def run(self): self._begin_logging() self._delegate.begin_work_queue() while (self._delegate.should_continue_work_queue()): try: self._ensure_work_log_closed() work_item = self._delegate.next_work_item() if not work_item: self._sleep("No work item.") continue if not self._delegate.should_proceed_with_work_item(work_item): self._sleep("Not proceeding with work item.") continue # FIXME: Work logs should not depend on bug_id specificaly. # This looks fixed, no? self._open_work_log(work_item) try: if not self._delegate.process_work_item(work_item): self._sleep("Unable to process work item.") except ScriptError, e: # Use a special exit code to indicate that the error was already # handled in the child process and we should just keep looping. if e.exit_code == self.handled_error_code: continue message = "Unexpected failure when landing patch! Please file a bug against webkit-patch.\n%s" % e.message_with_output() self._delegate.handle_unexpected_error(work_item, message) except TerminateQueue, e: log("\nTerminateQueue exception received.") return 0 except KeyboardInterrupt, e: log("\nUser terminated queue.") return 1
def set_flag_on_attachment( self, attachment_id, flag_name, flag_value, comment_text=None, additional_comment_text=None ): log( "MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % (flag_name, flag_value, attachment_id, comment_text, additional_comment_text) )
def _failure_types_from_actual_result(self, actual): # FIXME: There doesn't seem to be a full list of all possible values of # 'actual' anywhere. However JSONLayoutResultsGenerator.FAILURE_TO_CHAR # is a useful reference as that's for "old" style results.json files # # FIXME: TEXT, IMAGE_PLUS_TEXT, and AUDIO are obsolete but we keep them for # now so that we can parse old results.json files. if actual == test_expectations.PASS: return [] elif actual == test_expectations.FAIL: return [test_failures.FailureTextMismatch(), test_failures.FailureImageHashMismatch(), test_failures.FailureAudioMismatch()] elif actual == test_expectations.TEXT: return [test_failures.FailureTextMismatch()] elif actual == test_expectations.IMAGE: return [test_failures.FailureImageHashMismatch()] elif actual == test_expectations.IMAGE_PLUS_TEXT: return [test_failures.FailureImageHashMismatch(), test_failures.FailureTextMismatch()] elif actual == test_expectations.AUDIO: return [test_failures.FailureAudioMismatch()] elif actual == test_expectations.TIMEOUT: return [test_failures.FailureTimeout()] elif actual == test_expectations.CRASH: # NOTE: We don't know what process crashed from the json, just that a process crashed. return [test_failures.FailureCrash()] elif actual == test_expectations.MISSING: return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()] else: log("Failed to handle: %s" % self._result_dict['actual']) return []
def bug_id_for_attachment_id(self, attachment_id): self.authenticate() attachment_url = self.attachment_url_for_id(attachment_id, 'edit') log("Fetching: %s" % attachment_url) page = self.browser.open(attachment_url) return self._parse_bug_id_from_attachment_page(page)
def _fetch_list_of_patches_to_process(self, options, args, tool): all_patches = [] for bug_id in args: patches = tool.bugs.fetch_bug(bug_id).reviewed_patches() log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id)) all_patches += patches return all_patches
def set_flag_on_attachment(self, attachment_id, flag_name, flag_value, comment_text=None, additional_comment_text=None): # FIXME: We need a way to test this function on a live bugzilla # instance. self.authenticate() if additional_comment_text: comment_text += "\n\n%s" % additional_comment_text log(comment_text) if self.dryrun: return self.browser.open(self.attachment_url_for_id(attachment_id, 'edit')) self.browser.select_form(nr=1) if comment_text: self.browser.set_value(comment_text, name='comment', nr=0) self._find_select_element_for_flag(flag_name).value = (flag_value,) self.browser.submit()
def main(self, argv=sys.argv): (command_name, args) = self._split_command_name_from_args(argv[1:]) option_parser = self._create_option_parser() self._add_global_options(option_parser) command = self.command_by_name(command_name) or self.help_command if not command: option_parser.error("%s is not a recognized command" % command_name) command.set_option_parser(option_parser) (options, args) = command.parse_args(args) self.handle_global_options(options) (should_execute, failure_reason) = self.should_execute_command(command) if not should_execute: log(failure_reason) return 0 # FIXME: Should this really be 0? while True: try: result = command.check_arguments_and_execute(options, args, self) break except TryAgain, e: pass
def apply_reverse_diff(self, revision): # '-c -revision' applies the inverse diff of 'revision' svn_merge_args = ['svn', 'merge', '--non-interactive', '-c', '-%s' % revision, self._repository_url()] log("WARNING: svn merge has been known to take more than 10 minutes to complete. It is recommended you use git for rollouts.") log("Running '%s'" % " ".join(svn_merge_args)) # FIXME: Should this use cwd=self.checkout_root? self.run(svn_merge_args)
def run(self, state): if not self._options.test: return if not self._options.non_interactive: # FIXME: We should teach the commit-queue and the EWS how to run these tests. python_unittests_command = self._tool.port().run_python_unittests_command() if python_unittests_command: log("Running Python unit tests") self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root) perl_unittests_command = self._tool.port().run_perl_unittests_command() if perl_unittests_command: log("Running Perl unit tests") self._tool.executive.run_and_throw_if_fail(perl_unittests_command, cwd=self._tool.scm().checkout_root) javascriptcore_tests_command = self._tool.port().run_javascriptcore_tests_command() if javascriptcore_tests_command: log("Running JavaScriptCore tests") self._tool.executive.run_and_throw_if_fail(javascriptcore_tests_command, quiet=True, cwd=self._tool.scm().checkout_root) webkit_unit_tests_command = self._tool.port().run_webkit_unit_tests_command() if webkit_unit_tests_command: log("Running WebKit unit tests") args = webkit_unit_tests_command if self._options.non_interactive: args.append("--gtest_output=xml:%s/webkit_unit_tests_output.xml" % self._tool.port().results_directory) try: self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root) except ScriptError, e: log("Error running webkit_unit_tests: %s" % e.message_with_output())
def _commit_on_branch(self, message, git_commit): branch_ref = self.run(['git', 'symbolic-ref', 'HEAD']).strip() branch_name = branch_ref.replace('refs/heads/', '') commit_ids = self.commit_ids_from_commitish_arguments([git_commit]) # We want to squash all this branch's commits into one commit with the proper description. # We do this by doing a "merge --squash" into a new commit branch, then dcommitting that. MERGE_BRANCH_NAME = 'webkit-patch-land' self.delete_branch(MERGE_BRANCH_NAME) # We might be in a directory that's present in this branch but not in the # trunk. Move up to the top of the tree so that git commands that expect a # valid CWD won't fail after we check out the merge branch. os.chdir(self.checkout_root) # Stuff our change into the merge branch. # We wrap in a try...finally block so if anything goes wrong, we clean up the branches. commit_succeeded = True try: self.run(['git', 'checkout', '-q', '-b', MERGE_BRANCH_NAME, self.remote_branch_ref()]) for commit in commit_ids: # We're on a different branch now, so convert "head" to the branch name. commit = re.sub(r'(?i)head', branch_name, commit) # FIXME: Once changed_files and create_patch are modified to separately handle each # commit in a commit range, commit each cherry pick so they'll get dcommitted separately. self.run(['git', 'cherry-pick', '--no-commit', commit]) self.run(['git', 'commit', '-m', message]) output = self.push_local_commits_to_server() except Exception, e: log("COMMIT FAILED: " + str(e)) output = "Commit failed." commit_succeeded = False
def post(self, diff, message=None, codereview_issue=None, cc=None): if not message: raise ScriptError("Rietveld requires a message.") args = [ # First argument is empty string to mimic sys.argv. "", "--assume_yes", "--server=%s" % config.codereview_server_host, "--message=%s" % message, ] if codereview_issue: args.append("--issue=%s" % codereview_issue) if cc: args.append("--cc=%s" % cc) if self.dryrun: log("Would have run %s" % args) return # Set logging level to avoid rietveld's logging spew. old_level_name = logging.getLogger().getEffectiveLevel() logging.getLogger().setLevel(logging.ERROR) # Use RealMain instead of calling upload from the commandline so that # we can pass in the diff ourselves. Otherwise, upload will just use # git diff for git checkouts, which doesn't respect --squash and --git-commit. issue, patchset = upload.RealMain(args[1:], data=diff) # Reset logging level to the original value. logging.getLogger().setLevel(old_level_name) return issue
def create_bug(self, mks_bug): log('Creating MKS bug with title "%s"' % mks_bug.title()) if (self.dryrun): return -1 dev_task_xml = self._create_mks_request(bug_title=mks_bug.title(), bug_description=mks_bug.description(), component=mks_bug.component(), sub_component=mks_bug.sub_component(), build_type=mks_bug.build_type(), build_version=mks_bug.build_version(), component_targeted_release=mks_bug.component_targeted_release(), has_ui_impact=mks_bug.has_ui_impact(), reproducible=mks_bug.reproducible(), frequency_of_occurrence=mks_bug.frequency_of_occurrence(), issue_type=mks_bug.issue_type(), handheld_discovered_on=mks_bug.handheld_discovered_on(), reporter=mks_bug.reporter(), reporter_email=mks_bug.finder_email(), issue_owner=mks_bug.issue_owner(), assignee=mks_bug.assignee()) request = urllib2.Request(self.bug_server_url + "IndyWebServices/services/P4ChangeHelperFunctions") request.add_header("SOAPAction", "http://indy-testvm1/") request.add_data(dev_task_xml) response = urllib2.urlopen(request) response_str = response.read() return self._parse_mks_response_for_mks_id(response_str)
def _run_script(self, script_name, args=None, quiet=False, port=WebKitPort): log("Running %s" % script_name) command = [port.script_path(script_name)] if args: command.extend(args) # FIXME: This should use self.port() self._tool.executive.run_and_throw_if_fail(command, quiet)
def post(self, diff, patch_id, codereview_issue, message=None, cc=None): if not message: raise ScriptError("Rietveld requires a message.") # Rietveld has a 100 character limit on message length. if len(message) > 100: message = message[:100] args = [ # First argument is empty string to mimic sys.argv. "", "--assume_yes", "--server=%s" % config.codereview_server_host, "--message=%s" % message, "--webkit_patch_id=%s" % patch_id, ] if codereview_issue: args.append("--issue=%s" % codereview_issue) if cc: args.append("--cc=%s" % cc) if self.dryrun: log("Would have run %s" % args) return # Use RealMain instead of calling upload from the commandline so that # we can pass in the diff ourselves. Otherwise, upload will just use # git diff for git checkouts, which doesn't respect --git-commit. issue, patchset = upload.RealMain(args, data=diff) return issue
def _commit_on_branch(self, message, git_commit, username=None, password=None): branch_ref = self.run(["git", "symbolic-ref", "HEAD"]).strip() branch_name = branch_ref.replace("refs/heads/", "") commit_ids = self.commit_ids_from_commitish_arguments([git_commit]) # We want to squash all this branch's commits into one commit with the proper description. # We do this by doing a "merge --squash" into a new commit branch, then dcommitting that. MERGE_BRANCH_NAME = "webkit-patch-land" self.delete_branch(MERGE_BRANCH_NAME) # We might be in a directory that's present in this branch but not in the # trunk. Move up to the top of the tree so that git commands that expect a # valid CWD won't fail after we check out the merge branch. # FIXME: We should never be using chdir! We can instead pass cwd= to run_command/self.run! self._filesystem.chdir(self.checkout_root) # Stuff our change into the merge branch. # We wrap in a try...finally block so if anything goes wrong, we clean up the branches. commit_succeeded = True try: self.run(["git", "checkout", "-q", "-b", MERGE_BRANCH_NAME, self.remote_branch_ref()]) for commit in commit_ids: # We're on a different branch now, so convert "head" to the branch name. commit = re.sub(r"(?i)head", branch_name, commit) # FIXME: Once changed_files and create_patch are modified to separately handle each # commit in a commit range, commit each cherry pick so they'll get dcommitted separately. self.run(["git", "cherry-pick", "--no-commit", commit]) self.run(["git", "commit", "-m", message]) output = self.push_local_commits_to_server(username=username, password=password) except Exception, e: log("COMMIT FAILED: " + str(e)) output = "Commit failed." commit_succeeded = False
def feed(self): ids_needing_review = set(self._tool.bugs.queries.fetch_attachment_ids_from_review_queue()) new_ids = ids_needing_review.difference(self._ids_sent_to_server) log("Feeding EWS (%s, %s new)" % (pluralize("r? patch", len(ids_needing_review)), len(new_ids))) for attachment_id in new_ids: # Order doesn't really matter for the EWS. self._tool.status_server.submit_to_ews(attachment_id) self._ids_sent_to_server.add(attachment_id)
def run_command(self, args, cwd=None, input=None, error_handler=None, return_exit_code=False, return_stderr=True, decode_output=False, env=None): self.calls.append(args) assert(isinstance(args, list) or isinstance(args, tuple)) if self._should_log: env_string = "" if env: env_string = ", env=%s" % env input_string = "" if input: input_string = ", input=%s" % input log("MOCK run_command: %s, cwd=%s%s%s" % (args, cwd, env_string, input_string)) output = "MOCK output of child process" if self._should_throw: raise ScriptError("MOCK ScriptError", output=output) return output
def run(self, state): if not self._options.test: return python_unittests_command = self._tool.port().run_python_unittests_command() if python_unittests_command: log("Running Python unit tests") self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root) perl_unittests_command = self._tool.port().run_perl_unittests_command() if perl_unittests_command: log("Running Perl unit tests") self._tool.executive.run_and_throw_if_fail(perl_unittests_command, cwd=self._tool.scm().checkout_root) javascriptcore_tests_command = self._tool.port().run_javascriptcore_tests_command() if javascriptcore_tests_command: log("Running JavaScriptCore tests") self._tool.executive.run_and_throw_if_fail(javascriptcore_tests_command, quiet=True, cwd=self._tool.scm().checkout_root) webkit_unit_tests_command = self._tool.port().run_webkit_unit_tests_command() if webkit_unit_tests_command: log("Running WebKit unit tests") self._tool.executive.run_and_throw_if_fail(webkit_unit_tests_command, cwd=self._tool.scm().checkout_root) log("Running run-webkit-tests") args = self._tool.port().run_webkit_tests_command() if self._options.non_interactive: args.append("--no-new-test-results") args.append("--no-launch-safari") args.append("--exit-after-n-failures=%s" % self.NON_INTERACTIVE_FAILURE_LIMIT_COUNT) if self._options.quiet: args.append("--quiet") self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
def authenticate(self): if self.authenticated: return credentials = Credentials(config_urls.bug_server_host, git_prefix="bugzilla") attempts = 0 while not self.authenticated: attempts += 1 username, password = credentials.read_credentials() log("Logging in as %s..." % username) self.browser.open(config_urls.bug_server_url + "index.cgi?GoAheadAndLogIn=1") self.browser.select_form(name="login") self.browser["Bugzilla_login"] = username self.browser["Bugzilla_password"] = password response = self.browser.submit() match = re.search("<title>(.+?)</title>", response.read()) # If the resulting page has a title, and it contains the word # "invalid" assume it's the login failure page. if match and re.search("Invalid", match.group(1), re.IGNORECASE): errorMessage = "Bugzilla login failed: %s" % match.group(1) # raise an exception only if this was the last attempt if attempts < 5: log(errorMessage) else: raise Exception(errorMessage) else: self.authenticated = True self.username = username
def add_patch_to_bug( self, bug_id, file_or_string, description, comment_text=None, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=False, ): self.authenticate() log('Adding patch "%s" to %s' % (description, self.bug_url_for_bug_id(bug_id))) self.browser.open(self.add_attachment_url(bug_id)) self.browser.select_form(name="entryform") file_object = self._file_object_for_upload(file_or_string) filename = self._filename_for_upload(file_object, bug_id, extension="patch") self._fill_attachment_form( description, file_object, mark_for_review=mark_for_review, mark_for_commit_queue=mark_for_commit_queue, mark_for_landing=mark_for_landing, is_patch=True, filename=filename, ) if comment_text: log(comment_text) self.browser["comment"] = comment_text self.browser.submit()
def run(self, state): self._commit_message = self._tool.checkout().commit_message_for_this_commit(self._options.git_commit).message() if len(self._commit_message) < 50: raise Exception("Attempted to commit with a commit message shorter than 50 characters. Either your patch is missing a ChangeLog or webkit-patch may have a bug.") self._state = state username = None force_squash = False num_tries = 0 while num_tries < 3: num_tries += 1 try: scm = self._tool.scm() commit_text = scm.commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash) svn_revision = scm.svn_revision_from_commit_text(commit_text) log("Committed r%s: <%s>" % (svn_revision, view_source_url(svn_revision))) self._state["commit_text"] = commit_text break; except AmbiguousCommitError, e: if self._tool.user.confirm(self._commit_warning(e)): force_squash = True else: # This will correctly interrupt the rest of the commit process. raise ScriptError(message="Did not commit") except AuthenticationError, e: username = self._tool.user.prompt("%s login: "******"You need to specify the username on %s to perform the commit as." % self.svn_server_host)
def begin_work_queue(self): log("CAUTION: %s will discard all local changes in \"%s\"" % (self.name, self.tool.scm().checkout_root)) if self.options.confirm: response = self.tool.user.prompt("Are you sure? Type \"yes\" to continue: ") if (response != "yes"): error("User declined.") log("Running WebKit %s." % self.name)
def run_and_handle_errors(self, tool, options, state=None): if not state: state = {} try: self._run(tool, options, state) except CheckoutNeedsUpdate, e: log("Commit failed because the checkout is out of date. Please update and try again.") QueueEngine.exit_after_handled_error(e)
def add_cc_to_bug(self, bug_id, email_address_list): self.authenticate() log("Adding %s to the CC list for bug %s" % (email_address_list, bug_id)) self.browser.open(self.bug_url_for_bug_id(bug_id)) self.browser.select_form(name="changeform") self.browser["newcc"] = ", ".join(email_address_list) self.browser.submit()
def running_pids(self, process_name_filter): running_pids = [] for process_name, process_pid in self._running_pids.iteritems(): if process_name_filter(process_name): running_pids.append(process_pid) log("MOCK running_pids: %s" % running_pids) return running_pids
def _guess_reviewer_from_bug(self, bug_id): patches = self._tool.bugs.fetch_bug(bug_id).reviewed_patches() if not patches: log("%s on bug %s, cannot infer reviewer." % ("No reviewed patches", bug_id)) return None patch = patches[-1] log("Guessing \"%s\" as reviewer from attachment %s on bug %s." % (patch.reviewer().full_name, patch.id(), bug_id)) return patch.reviewer().full_name
def run(self, state): if not self._options.check_builders: return red_builders_names = self._tool.buildbot.red_core_builders_names() if not red_builders_names: return red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names. log("\nWARNING: Builders [%s] are red, please watch your commit carefully.\nSee http://%s/console?category=core\n" % (", ".join(red_builders_names), self._tool.buildbot.buildbot_host))
def ensure_clean_working_directory(self, force_clean): if not force_clean and not self.working_directory_is_clean(): # FIXME: Shouldn't this use cwd=self.checkout_root? print self.run(self.status_command(), error_handler=Executive.ignore_error) raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.") log("Cleaning working directory") self.clean_working_directory()
def begin_work_queue(self): log('CAUTION: %s will discard all local changes in "%s"' % (self.name, self._tool.scm().checkout_root)) if self.options.confirm: response = self._tool.user.prompt('Are you sure? Type "yes" to continue: ') if response != "yes": error("User declined.") log("Running WebKit %s." % self.name) self._tool.status_server.update_status(self.name, "Starting Queue")
def _guess_reviewer_from_bug(self, bug_id): patches = self._tool.bugs.fetch_bug(bug_id).reviewed_patches() if len(patches) != 1: log("%s on bug %s, cannot infer reviewer." % (pluralize("reviewed patch", len(patches)), bug_id)) return None patch = patches[0] log("Guessing \"%s\" as reviewer from attachment %s on bug %s." % (patch.reviewer().full_name, patch.id(), bug_id)) return patch.reviewer().full_name
def execute(self, options, args, tool): patch_ids = tool.bugs.queries.fetch_attachment_ids_from_review_queue() log("Patches pending review:") for patch_id in patch_ids: print patch_id
def execute(self, options, args, tool): patches = tool.bugs.queries.fetch_patches_from_commit_queue() log("Patches in commit queue:") for patch in patches: print patch.url()
def handle_script_error(cls, tool, state, script_error): log(script_error.message_with_output())
def exit_after_handled_error(cls, error): log(error) exit(cls.handled_error_code)
def update_status(self, queue_name, status, patch=None, results_file=None): log(status) return NetworkTransaction().run(lambda: self._post_status_to_server( queue_name, status, patch, results_file))
def report_flaky_tests(self, patch, flaky_results, results_archive): flaky_tests = [result.filename for result in flaky_results] log("report_flaky_tests: patch='%s' flaky_tests='%s' archive='%s'" % (patch.id(), flaky_tests, results_archive.filename))
def _sleep(self, message): log(self._sleep_message(message)) self._wakeup_event.wait(self.seconds_to_sleep) self._wakeup_event.clear()
def run_command(self, command): log("run_webkit_patch: %s" % command) if self._error_plan: error = self._error_plan.pop(0) if error: raise error
def _fetch_bug_page(self, bug_id): bug_url = self.bug_url_for_bug_id(bug_id, xml=True) log("Fetching: %s" % bug_url) return self.browser.open(bug_url)
def _cc_watchers(self, bug_id): try: self._tool.bugs.add_cc_to_bug(bug_id, self.watchers) except Exception, e: traceback.print_exc() log("Failed to CC watchers.")
def handle_unexpected_error(self, new_failures, message): log(message)
def archive_last_layout_test_results(self, patch): log("archive_last_layout_test_results: patch='%s'" % patch.id()) archive = Mock() archive.filename = "mock-archive-%s.zip" % patch.id() return archive
def run(self, state): log("Processing patch %s from bug %s." % (state["patch"].id(), state["patch"].bug_id())) self._tool.checkout().apply_patch(state["patch"])
def handle_script_error(cls, tool, state, script_error): # FIXME: Why does this not exit(1) like the superclass does? log(script_error.message_with_output())
def update_svn_revision(self, svn_revision_number, broken_bot): log("SVN revision: %s broke %s" % (svn_revision_number, broken_bot)) return NetworkTransaction().run( lambda: self._post_svn_revision_to_server(svn_revision_number, broken_bot))
def handle_unexpected_error(self, failure_map, message): log(message)
def run(self, state): if not self._options.update: return log("Updating working directory") self._tool.executive.run_and_throw_if_fail(self.port().update_webkit_command(), quiet=True)
def handle_script_error(cls, tool, state, script_error): # Hitting this error handler should be pretty rare. It does occur, # however, when a patch no longer applies to top-of-tree in the final # land step. log(script_error.message_with_output())
def handle_unexpected_error(self, work_item, message): log(message)
def handle_unexpected_error(self, patch, message): log(message)
def _tokenize(self, results_string): tokens = map(TestExpectations.expectation_from_string, results_string.split(' ')) if None in tokens: log("Unrecognized result in %s" % results_string) return set(tokens)
def _stopping(self, message): log("\n%s" % message) self._delegate.stop_work_queue(message) # Be careful to shut down our OutputTee or the unit tests will be unhappy. self._ensure_work_log_closed() self._output_tee.remove_log(self._queue_log)
def post(self, diff, patch_id, codereview_issue, message=None, cc=None): log("MOCK: Uploading patch to rietveld")
def write_variable(self, name, value): log("MOCK: MockDEPS.write_variable(%s, %s)" % (name, value))
def update_status(self, queue_name, status, patch=None, results_file=None): log("MOCK: update_status: %s %s" % (queue_name, status)) return 187
def _update_work_items(self, item_ids): # FIXME: This is the last use of update_work_items, the commit-queue # should move to feeding patches one at a time like the EWS does. self._tool.status_server.update_work_items(self.queue_name, item_ids) log("Feeding %s items %s" % (self.queue_name, item_ids))
def command_failed(self, failure_message, script_error, patch): log("command_failed: failure_message='%s' script_error='%s' patch='%s'" % ( failure_message, script_error, patch.id())) return 3947
def run_and_throw_if_fail(self, args, quiet=False): if self._should_log: log("MOCK run_and_throw_if_fail: %s" % args) return "MOCK output of child process"
def command_passed(self, success_message, patch): log("command_passed: success_message='%s' patch='%s'" % ( success_message, patch.id()))
def update_work_items(self, queue_name, work_items): log("MOCK: update_work_items: %s %s" % (queue_name, work_items))