Bug 1596074 - Type mismatch between g5/pixel platform name and "android" - r=rwood
authorTarek Ziadé <tarek@mozilla.com>
Thu, 14 Nov 2019 06:38:56 +0000
changeset 501895 a65aef85ad0df16d756283fb1975cdd90ea61843
parent 501894 646f38ad2746a55ee42a1d1002f922a69c5b91c5
child 501896 6514e3ddd69bd92dad544554768b5fa3c4960613
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrwood
bugs1596074
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596074 - Type mismatch between g5/pixel platform name and "android" - r=rwood Fixes the platform for mobile for the changelog API Differential Revision: https://phabricator.services.mozilla.com/D52849
testing/condprofile/condprof/changelog.py
testing/condprofile/condprof/runner.py
--- a/testing/condprofile/condprof/changelog.py
+++ b/testing/condprofile/condprof/changelog.py
@@ -16,16 +16,18 @@ import sys
 # XXX we should do one per platform and use platform-changelog.json as a name
 class Changelog:
     def __init__(self, archives_dir):
         self.archives_dir = archives_dir
         self.location = os.path.join(archives_dir, "changelog.json")
         if os.path.exists(self.location):
             with open(self.location) as f:
                 self._data = json.loads(f.read())
+                if "changes" not in self._data:
+                    self._data["changes"] = []
         else:
             self._data = {"changes": []}
 
     def append(self, action, platform=sys.platform, **metadata):
         now = datetime.timestamp(datetime.now())
         log = {"action": action, "platform": platform, "when": now}
         log.update(metadata)
         # adding taskcluster specific info if we see it in the env
--- a/testing/condprofile/condprof/runner.py
+++ b/testing/condprofile/condprof/runner.py
@@ -112,17 +112,20 @@ def main(args=sys.argv[1:]):
     if not os.path.exists(args.archive):
         os.makedirs(args.archive, exist_ok=True)
 
     LOG("Verifying Geckodriver binary presence")
     if shutil.which(args.geckodriver) is None and not os.path.exists(args.geckodriver):
         raise IOError("Cannot find %s" % args.geckodriver)
 
     try:
-        plat = args.android and "android" or get_current_platform()
+        if args.android:
+            plat = "%s-%s" % (args.device_name, args.firefox.split("org.mozilla.")[-1])
+        else:
+            plat = get_current_platform()
         changelog = read_changelog(plat)
         LOG("Got the changelog from TaskCluster")
     except ProfileNotFoundError:
         LOG("changelog not found on TaskCluster, creating a local one.")
         changelog = Changelog(args.archive)
     loop = asyncio.get_event_loop()
 
     async def one_run(scenario, customization):