Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1562923 - Check if raptor web extension is installed before unins…
Browse files Browse the repository at this point in the history
…talling. 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
  • Loading branch information
Gregory Mierzwinski committed Jul 3, 2019
1 parent 4a089a1 commit 431c953
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/raptor/raptor/raptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def __init__(self, app, binary, run_local=False, obj_path=None, profile_class=No
}

self.raptor_venv = os.path.join(os.getcwd(), 'raptor-venv')
self.raptor_webext = None
self.control_server = None
self.playback = None
self.benchmark = None
Expand Down Expand Up @@ -323,6 +324,10 @@ def install_raptor_webext(self):

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)
Expand Down

0 comments on commit 431c953

Please sign in to comment.