xpcshell-tests for add-on manager broken when update channel is set to aurora/beta/release

RESOLVED FIXED in Firefox 10

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: standard8, Assigned: darktrojan)

Tracking

Trunk
mozilla11
Points:
---
Bug Flags:
in-testsuite -
in-litmus -

Firefox Tracking Flags

(firefox10 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

Following on from the fixes in bug 700988, xpcshell tests are still broken when the update channel is set to one of aurora, beta, or release. This means our aurora nightly tests fail.

Typical example:

TEST-UNEXPECTED-FAIL | /buildbot/comm-aurora-linux-opt-unittest-xpcshell/build/xpcshell/tests/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js | test failed (with xpcshell return code: 3), see following log:
>>>>>>>
uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: /buildbot/comm-aurora-linux-opt-unittest-xpcshell/build/xpcshell/tests/toolkit/mozapps/extensions/test/xpcshell/head_addons.js :: <TOP_LEVEL> :: line 15"  data: no]
<<<<<<<

I've tracked this down to this line of code:

const PREF_CHECK_COMPATIBILITY = PREF_CHECK_COMPATIBILITY_BASE + "." +
                                 Services.appinfo.version.replace(BRANCH_REGEXP, "$1");

Although bug 700988 has defined BRANCH_REGEXP, the issue now is Services.appinfo.version. If I replace that with a standard variable, the tests pass.

Now I get confused, head_addons.js clearly defines nsIXULAppInfo, but that doesn't seem to be getting picked up here, maybe it is too early in xpcshell's load process?

I'm not going to be able to work on this now, so if others can pick it up that'd be useful.
The module is being imported at the top level, before createAppInfo() is called in the test, and the Services.appinfo.version reference is a global in the module, so it's run at import time. You could probably solve the issue by computing PREF_CHECK_COMPATIBILITY lazily...
(Assignee)

Comment 2

6 years ago
Created attachment 573342 [details] [diff] [review]
fix

I'll push this to try with the Makefile rigged to cause the bug.
Attachment #573342 - Flags: review?(dtownsend)
(Assignee)

Comment 3

6 years ago
Looks like this is working fine on try, if you ignore the random oranges and the timebomb. I also filed bug 701298 which would cause orange in the same circumstances.
https://tbpl.mozilla.org/?tree=Try&rev=adab1f1bb32c
Attachment #573342 - Flags: review?(dtownsend) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/141b495ea4f5
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: in-testsuite-
Flags: in-litmus-
Target Milestone: --- → mozilla11
(Assignee)

Comment 5

6 years ago
Comment on attachment 573342 [details] [diff] [review]
fix

This needs to land on aurora so it can actually pass its tests.
Attachment #573342 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/141b495ea4f5
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
status-firefox10: --- → affected
tracking-firefox10: --- → ?

Comment 7

6 years ago
Comment on attachment 573342 [details] [diff] [review]
fix

[Triage Comment]
Fixes orange, approving for aurora.
Attachment #573342 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 8

6 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/e99625fee18a
status-firefox10: affected → fixed
tracking-firefox10: ? → ---
Marking qa- as there is nothing QA needs to verify here. Please set to qa+ if this is not the case.
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.