Closed
Bug 1069687
Opened 9 years ago
Closed 2 years ago
Robocop tests run against the default profile
Categories
(Firefox for Android Graveyard :: Testing, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: rnewman, Unassigned, Mentored)
References
Details
(Whiteboard: [has bitrotted patch])
Attachments
(1 file, 2 obsolete files)
2.61 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Testing current fx-team, so I don't know if this changed recently. Instrumenting: diff --git a/mobile/android/base/GeckoSharedPrefs.java b/mobile/android/base/GeckoSharedPrefs.java --- a/mobile/android/base/GeckoSharedPrefs.java +++ b/mobile/android/base/GeckoSharedPrefs.java @@ -96,16 +96,17 @@ public final class GeckoSharedPrefs { * flag. */ public static SharedPreferences forProfile(Context context, EnumSet<Flags> flags) { String profileName = GeckoProfile.get(context).getName(); if (profileName == null) { throw new IllegalStateException("Could not get current profile name"); } + Log.i("GeckoXXX", "Opening SharedPreferences: " + profileName); return forProfileName(context, profileName, flags); } public static SharedPreferences forProfileName(Context context, String profileName) { return forProfileName(context, profileName, EnumSet.noneOf(Flags.class)); } /** Yields the horror: 09-18 16:12:07.631 I/GeckoXXX(26421): Opening SharedPreferences: default Similarly, instrumenting browser.js: GeckoXXX: /storage/emulated/legacy/tests/profile The profile directory is deleted between app runs, but *SharedPreferences is not*. That means that on developer machines, tests run with a config that's half fresh, half stale. We should not do this.
Reporter | ||
Comment 1•9 years ago
|
||
And in BaseTest#runTest: mProfile is /storage/sdcard0/tests/profile
Reporter | ||
Comment 2•9 years ago
|
||
This seems to be the smallest possible change for sanity: clear the profile's prefs prior to running the test. Testing now.
Attachment #8491921 -
Flags: review?(mark.finkle)
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•9 years ago
|
||
Now without spurious import.
Attachment #8491930 -
Flags: review?(mark.finkle)
Reporter | ||
Updated•9 years ago
|
Attachment #8491921 -
Attachment is obsolete: true
Attachment #8491921 -
Flags: review?(mark.finkle)
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8491930 [details] [diff] [review] Clear per-profile preferences for the provided profile prior to Robocop test run. v2 Actually, this needs a new version -- this uses a profile path, so *tableflip*
Attachment #8491930 -
Flags: review?(mark.finkle)
Reporter | ||
Comment 5•9 years ago
|
||
Here's a better approach. By passing a profile name, we use a unique prefs file for each test run. They don't get cleaned up, but that's not a problem on infra, and developers can always use Clear Data.
Attachment #8491948 -
Flags: review?(mark.finkle)
Reporter | ||
Updated•9 years ago
|
Attachment #8491930 -
Attachment is obsolete: true
Comment 6•9 years ago
|
||
Comment on attachment 8491948 [details] [diff] [review] Specify a unique profile name for each Robocop test run. v1 Let's hope this does not make TBPL unhappy
Attachment #8491948 -
Flags: review?(mark.finkle) → review+
Reporter | ||
Comment 7•9 years ago
|
||
It very probably does, but I'll fix the tests!
Comment 8•9 years ago
|
||
How are you launching Robocop? I wonder if something's up with that. 'cuz I'm pretty sure we're okay on instrumentation.
Comment 9•9 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #5) > Created attachment 8491948 [details] [diff] [review] > Specify a unique profile name for each Robocop test run. v1 > > Here's a better approach. > > By passing a profile name, we use a unique prefs file for each test run. I'm not confident that -p and -P interact well together. Try run, please. > They don't get cleaned up, but that's not a problem on infra, and developers > can always use Clear Data. That's not true -- we run out of inodes on the Pandas occasionally.
Reporter | ||
Comment 10•9 years ago
|
||
(In reply to Nick Alexander :nalexander from comment #8) > How are you launching Robocop? I wonder if something's up with that. 'cuz > I'm pretty sure we're okay on instrumentation. Mach. And the same is true for Eclipse, IIRC.
Reporter | ||
Comment 11•9 years ago
|
||
(In reply to Nick Alexander :nalexander from comment #9) > That's not true -- we run out of inodes on the Pandas occasionally. I was under the impression that we uninstall the app between test runs. That'll clean up these files.
Comment 12•9 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #11) > (In reply to Nick Alexander :nalexander from comment #9) > > > That's not true -- we run out of inodes on the Pandas occasionally. > > I was under the impression that we uninstall the app between test runs. > That'll clean up these files. Ah, I reckon you're correct.
Reporter | ||
Comment 13•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=efb9c870ba44
Reporter | ||
Comment 14•9 years ago
|
||
This'll take a few iterations of test fixes to step through, so expect tiny follow-up reviews.
Reporter | ||
Comment 15•8 years ago
|
||
This has newfound relevance for something I'm doing in Bug 1077590. Marking as blocking that, just 'cos See Also is pretty vague.
Blocks: 1077590
Reporter | ||
Updated•8 years ago
|
Assignee: rnewman → nobody
Mentor: gbrown, nalexander
Status: ASSIGNED → NEW
Whiteboard: [has bitrotted patch]
Comment 16•2 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
Updated•2 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•