當前位置: 首頁>>代碼示例>>Python>>正文


Python TreeherderJob.add_group_name方法代碼示例

本文整理匯總了Python中treeherder.client.TreeherderJob.add_group_name方法的典型用法代碼示例。如果您正苦於以下問題:Python TreeherderJob.add_group_name方法的具體用法?Python TreeherderJob.add_group_name怎麽用?Python TreeherderJob.add_group_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在treeherder.client.TreeherderJob的用法示例。


在下文中一共展示了TreeherderJob.add_group_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_job_sample_data

# 需要導入模塊: from treeherder.client import TreeherderJob [as 別名]
# 或者: from treeherder.client.TreeherderJob import add_group_name [as 別名]
    def test_job_sample_data(self):

        for job in self.job_data:

            tj = TreeherderJob()

            tj.add_revision_hash(job['revision_hash'])
            tj.add_project(job['project'])
            tj.add_coalesced_guid(job['coalesced'])
            tj.add_job_guid(job['job']['job_guid'])
            tj.add_job_name(job['job']['name'])
            tj.add_job_symbol(job['job']['job_symbol'])
            tj.add_group_name(job['job']['group_name'])
            tj.add_group_symbol(job['job']['group_symbol'])
            tj.add_description(job['job']['desc'])
            tj.add_product_name(job['job']['product_name'])
            tj.add_state(job['job']['state'])
            tj.add_result(job['job']['result'])
            tj.add_reason(job['job']['reason'])
            tj.add_who(job['job']['who'])
            tj.add_submit_timestamp(job['job']['submit_timestamp'])
            tj.add_start_timestamp(job['job']['start_timestamp'])
            tj.add_end_timestamp(job['job']['end_timestamp'])
            tj.add_machine(job['job']['machine'])
            tj.add_build_url(job['job']['build_url'])

            tj.add_build_info(
                job['job']['build_platform']['os_name'],
                job['job']['build_platform']['platform'],
                job['job']['build_platform']['architecture']
                )

            tj.add_machine_info(
                job['job']['machine_platform']['os_name'],
                job['job']['machine_platform']['platform'],
                job['job']['machine_platform']['architecture']
                )

            tj.add_option_collection(job['job']['option_collection'])

            tj.add_log_reference(
                'builds-4h', job['job']['log_references'][0]['url'])

            # if the blob is empty, TreeherderJob will ignore the insertion
            job['job']['artifacts'][0]['blob'] = "some value"

            tj.add_artifact(
                job['job']['artifacts'][0]['name'],
                job['job']['artifacts'][0]['type'],
                job['job']['artifacts'][0]['blob'])

            self.compare_structs(tj.data, job)

            # Confirm we get the same dict if we initialize from
            # a job dict
            tj_dict = TreeherderJob(job)
            self.compare_structs(tj.data, tj_dict.data)
開發者ID:mjzffr,項目名稱:treeherder,代碼行數:59,代碼來源:test_treeherder_client.py

示例2: test_job_sample_data

# 需要導入模塊: from treeherder.client import TreeherderJob [as 別名]
# 或者: from treeherder.client.TreeherderJob import add_group_name [as 別名]
    def test_job_sample_data(self):

        for job in self.job_data:

            tj = TreeherderJob()

            tj.add_revision_hash(job["revision_hash"])
            tj.add_project(job["project"])
            tj.add_coalesced_guid(job["coalesced"])
            tj.add_job_guid(job["job"]["job_guid"])
            tj.add_job_name(job["job"]["name"])
            tj.add_job_symbol(job["job"]["job_symbol"])
            tj.add_group_name(job["job"]["group_name"])
            tj.add_group_symbol(job["job"]["group_symbol"])
            tj.add_description(job["job"]["desc"])
            tj.add_product_name(job["job"]["product_name"])
            tj.add_state(job["job"]["state"])
            tj.add_result(job["job"]["result"])
            tj.add_reason(job["job"]["reason"])
            tj.add_who(job["job"]["who"])
            tj.add_submit_timestamp(job["job"]["submit_timestamp"])
            tj.add_start_timestamp(job["job"]["start_timestamp"])
            tj.add_end_timestamp(job["job"]["end_timestamp"])
            tj.add_machine(job["job"]["machine"])
            tj.add_build_url(job["job"]["build_url"])

            tj.add_build_info(
                job["job"]["build_platform"]["os_name"],
                job["job"]["build_platform"]["platform"],
                job["job"]["build_platform"]["architecture"],
            )

            tj.add_machine_info(
                job["job"]["machine_platform"]["os_name"],
                job["job"]["machine_platform"]["platform"],
                job["job"]["machine_platform"]["architecture"],
            )

            tj.add_option_collection(job["job"]["option_collection"])

            tj.add_log_reference("builds-4h", job["job"]["log_references"][0]["url"])

            # if the blob is empty, TreeherderJob will ignore the insertion
            job["job"]["artifacts"][0]["blob"] = "some value"

            tj.add_artifact(
                job["job"]["artifacts"][0]["name"],
                job["job"]["artifacts"][0]["type"],
                job["job"]["artifacts"][0]["blob"],
            )

            self.compare_structs(tj.data, job)

            # Confirm we get the same dict if we initialize from
            # a job dict
            tj_dict = TreeherderJob(job)
            self.compare_structs(tj.data, tj_dict.data)
開發者ID:EdgarChen,項目名稱:treeherder,代碼行數:59,代碼來源:test_treeherder_client.py


注:本文中的treeherder.client.TreeherderJob.add_group_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。