Autophone - uninstall previous org.mozilla packages prior to installing build

RESOLVED FIXED

Status

Testing
Autophone
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bc, Assigned: bc)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8567360 [details] [diff] [review]
bug-xxxxx-remove-org.mozilla-packages.patch v1

When running fennec builds for various releases (beta, aurora, release) vs nightly it is possible for previous test runs to leave a build installed if the autophone worker dies or otherwise does not clean up properly after itself.

This can be a problem especially for webappstartup tests which will throw a prompt to the user to select which version of fennec should be used to load the web app if there is more than one version of firefox for android installed.

This change enumerates all org.mozilla.(fennec|firefox) packages and uninstalls them, then uninstalls the app which is about to be installed.
Attachment #8567360 - Flags: review?(mcote)

Comment 1

3 years ago
Comment on attachment 8567360 [details] [diff] [review]
bug-xxxxx-remove-org.mozilla-packages.patch v1

Review of attachment 8567360 [details] [diff] [review]:
-----------------------------------------------------------------

::: worker.py
@@ +442,5 @@
> +                # with the test.
> +                mozilla_packages = [
> +                    p.replace('package:', '') for p in
> +                    self.dm.shell_output("pm list package org.mozilla").split()
> +                    if re.match('package:.*(fennec|firefox)', p)]

I feel like there's some way to eliminate the replace() call since you can do group matching in re.match(), but it may not be any nicer.
Attachment #8567360 - Flags: review?(mcote) → review+
(Assignee)

Comment 2

3 years ago
https://github.com/mozilla/autophone/commit/1a94922527c3eba8701b4c6de5d081440da75e6d
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.