Bug 1562923 - Check if raptor web extension is installed before uninstalling. r=perftest-reviewers,Bebe,alexandru.irimovici
authorGregory Mierzwinski <gmierz2@outlook.com>
Wed, 03 Jul 2019 12:39:55 +0000
changeset 543939 d6a437cfeb781c945870b4297c3815e702865777
parent 543938 cab912119d7999d329e3cb06f15ad780547fa119
child 543940 365d1b03475e7f0ae89f26d9eaa30645b7dec4c8
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, Bebe, alexandru
bugs1562923
milestone69.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 1562923 - Check if raptor web extension is installed before uninstalling. r=perftest-reviewers,Bebe,alexandru.irimovici This patch makes Raptor check if the web extension was installed before attempting to uninstall it. Differential Revision: https://phabricator.services.mozilla.com/D36622
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -107,16 +107,17 @@ class Raptor(object):
             'cpu_test': cpu_test,
             'is_release_build': is_release_build,
             'enable_control_server_wait': memory_test,
             'e10s': e10s,
             'enable_webrender': enable_webrender,
         }
 
         self.raptor_venv = os.path.join(os.getcwd(), 'raptor-venv')
+        self.raptor_webext = None
         self.control_server = None
         self.playback = None
         self.benchmark = None
         self.benchmark_port = 0
         self.gecko_profiler = None
         self.post_startup_delay = post_startup_delay
         self.device = None
         self.profile_class = profile_class or app
@@ -318,16 +319,20 @@ class Raptor(object):
         # on firefox we can get an addon id; chrome addon actually is just cmd line arg
         try:
             self.webext_id = self.profile.addons.addon_details(self.raptor_webext)['id']
         except AttributeError:
             self.webext_id = None
 
     def remove_raptor_webext(self):
         # remove the raptor webext; as it must be reloaded with each subtest anyway
+        if not self.raptor_webext:
+            LOG.info("raptor webext not installed - not attempting removal")
+            return
+
         LOG.info("removing webext %s" % self.raptor_webext)
         if self.config['app'] in ['firefox', 'geckoview', 'fennec', 'refbrow', 'fenix']:
             self.profile.addons.remove_addon(self.webext_id)
 
         # for chrome the addon is just a list (appended to cmd line)
         chrome_apps = CHROMIUM_DISTROS + ["chrome-android", "chromium-android"]
         if self.config['app'] in chrome_apps:
             self.profile.addons.remove(self.raptor_webext)