Bug 1331899 - Update fetchlogs script to work with taskcluster, r=emorley draft
authorJames Graham <james@hoppipolla.co.uk>
Mon, 16 Jan 2017 18:32:16 +0000
changeset 462997 c0e74a367a462ff2b6cea3dd9f1f76434d78afc9
parent 462996 c4b0ed5c2b3862249f358051fcc0d2d29a1c6cf7
child 542558 bdb937417ef1f03b836022381366216671ee2f60
push id41937
push userbmo:james@hoppipolla.co.uk
push dateWed, 18 Jan 2017 11:30:43 +0000
reviewersemorley
bugs1331899
milestone53.0a1
Bug 1331899 - Update fetchlogs script to work with taskcluster, r=emorley MozReview-Commit-ID: 3ENwyvJaXJY
testing/web-platform/update/fetchlogs.py
--- a/testing/web-platform/update/fetchlogs.py
+++ b/testing/web-platform/update/fetchlogs.py
@@ -67,17 +67,17 @@ def get_blobber_url(branch, job):
     artifact_params = {
         'job_guid': job_guid,
     }
     job_data = fetch_json(artifact_url, params=artifact_params)
 
     if job_data:
         try:
             for item in job_data["results"]:
-                if item["value"] == "wpt_raw.log":
+                if item["value"] == "wpt_raw.log" or item["value"] == "log_raw.log":
                     return item["url"]
         except:
             return None
 
 
 def get_structured_logs(branch, commit, dest=None):
     resultset_url = urlparse.urljoin(treeherder_base, "/api/project/%s/resultset/" % branch)
     resultset_params = {
@@ -91,17 +91,18 @@ def get_structured_logs(branch, commit, 
         'result_set_id': result_set,
         'count': 2000,
         'exclusion_profile': 'false',
     }
     job_data = fetch_json(jobs_url, params=jobs_params)
 
     for result in job_data["results"]:
         job_type_name = result["job_type_name"]
-        if job_type_name.startswith("W3C Web Platform"):
+        if (job_type_name.startswith("W3C Web Platform") or
+            job_type_name.startswith("test-") and "-web-platform-tests-" in job_type_name):
             url = get_blobber_url(branch, result)
             if url:
                 prefix = result["platform"] # platform
                 download(url, prefix, None)
 
 
 def main():
     parser = create_parser()