def generate_command_requirements_validator(self, platform): if platform == 'win32': buildername = "release-mozilla-beta_firefox_win32_l10n_repack_1_38.0_signing_task" funsize_artifact = get_task_by_name(self.graph, buildername) required_elements = ( "--partial-version 38.0", "--locale de --locale en-GB --locale zh-TW", "--taskid {}".format(funsize_artifact['taskId']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) elif platform == 'macosx64': buildername = "release-mozilla-beta_firefox_macosx64_l10n_repack_1_37.0_signing_task" funsize_artifact = get_task_by_name(self.graph, buildername) required_elements = ( "--partial-version 37.0", "--locale de --locale en-GB --locale zh-TW", "--taskid {}".format(funsize_artifact['taskId']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) @truth def validate_command_requirements(task): command = ''.join(task['task']['payload']['command']) for element in required_elements: if element not in command: return False else: return True return validate_command_requirements
def generate_command_requirements_validator(self, platform): # Command requirements for win32 if platform == 'win32': buildername = "win32_en-US_38.0build1_funsize_signing_task" funsize_artifact = get_task_by_name(self.graph, buildername) required_elements = ( "--partial-version 38.0", "--locale en-US", "--taskid {}".format(funsize_artifact['taskId']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) # Command requirements for macosx64 elif platform == 'macosx64': buildername = "macosx64_en-US_37.0build2_funsize_signing_task" funsize_artifact = get_task_by_name(self.graph, buildername) required_elements = ( "--partial-version 37.0", "--locale en-US", "--taskid {}".format(funsize_artifact['taskId']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) @truth def verify_command_requirements(task): command = ''.join(task['task']['payload']['command']) for element in required_elements: if element not in command: return False else: return True return verify_command_requirements
def validate_command_requirements(task): command = ''.join(task['task']['payload']['command']) required_elements = ( "--app-version 42.0", "--locale en-US", "--bucket fake_bucket", "--taskid {}".format(EN_US_CONFIG['platforms'][platform]['signed_task_id']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) for element in required_elements: if element not in command: return False else: return True
def validate_command_requirements(task): command = ''.join(task['task']['payload']['command']) required_elements = ( "--app-version 42.0", "--locale en-US", "--bucket fake_bucket", "--taskid {}".format(EN_US_CONFIG['platforms'][platform]['task_id']), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) for element in required_elements: if element not in command: return False else: return True
def verify_command_requirements(task): command = ''.join(task['task']['payload']['command']) required_elements = ( "--app-version 42.0", "--locale de --locale en-GB --locale zh-TW", "--bucket fake_bucket", "--taskid {}".format(task_id), "--platform {}".format(buildbot2ftp(platform)), "--version 42.0b2", ) for element in required_elements: if element not in command: return False else: return True
def test_platform_in_command(self): for platform, task in self.tasks.iteritems(): command = task["task"]["payload"]["command"] self.assertTrue("--platform {}".format(buildbot2ftp(platform)) in "".join(command))