Closed Bug 1017183 Opened 10 years ago Closed 10 years ago

xpcshell/mail/steel/test/test_linux_platformChecks.js fails on Linux when gconf is disabled

Categories

(Thunderbird :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 32.0

People

(Reporter: aceman, Assigned: aceman)

Details

Attachments

(1 file, 1 obsolete file)

I have ac_add_options --disable-gconf in .mozconfig, then I get this failure permanently:

TEST-INFO | /var/SSD/TB-hg/tbird-bin/mozilla/_tests/xpcshell/mail/steel/test/test_linux_platformChecks.js | running test ...
TEST-UNEXPECTED-FAIL | /var/SSD/TB-hg/tbird-bin/mozilla/_tests/xpcshell/mail/steel/test/test_linux_platformChecks.js | test failed (with xpcshell return code: 0), see following log:
>>>>>>>
TEST-INFO | (xpcshell/head.js) | test MAIN run_test pending (1)
TEST-UNEXPECTED-FAIL | /var/SSD/TB-hg/tbird-bin/mozilla/_tests/xpcshell/mail/steel/test/test_linux_platformChecks.js | false == true - See following stack:
JS frame :: /var/SSD/TB-hg/tbird-bin/mozilla/_tests/xpcshell/mail/steel/test/test_linux_platformChecks.js :: run_test :: line 11
JS frame :: /var/SSD/TB-hg/mozilla/testing/xpcshell/head.js :: _execute_test :: line 387
JS frame :: -e :: <TOP_LEVEL> :: line 1
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
TEST-INFO | (xpcshell/head.js) | exiting test

It is because steelApplication determines to be running under linux by checking if "gconf" exists in Components.classes. That does not seem right.
Attached patch patch (obsolete) — Splinter Review
This fixes it for me. We can't use Services.appinfo.OS as that returns "XPCShell" instead or real OS when running the test.
Attachment #8430244 - Flags: review?(standard8)
Or || @mozilla.org/gio-service;1 ?
There doesn't seem to be such a thing.
And guess what, gio can be disabled too :)
Huh? "@mozilla.org/gio-service;1" in Components.classes is true for me

I was under the assumption you have to use one of them. "Have to" if you have the full build...
Remember solaris, openbsd and other platforms that want to be (in this context) counted as linux.
Then they get caught by the gconf test ;) If they disable gconf then they are out of luck the same as Linux was before the patch. So they need to add their own test here.
Anyway, as you can see I add the gconf test in. So I expand it and count more systems as Linux (!gconf || Linux). I do not restrict it.
Yes, it's an improvement. I just suggested testing for gio-service too would be safer.
Yes, if you meant it as an addition I can do it too. I just understood it as a replacement of gconf with gio (which wouldn't help me as I have that disabled too).
Attached patch patch v2Splinter Review
Attachment #8430244 - Attachment is obsolete: true
Attachment #8430244 - Flags: review?(standard8)
Attachment #8431644 - Flags: review?(standard8)
Attachment #8431644 - Flags: review?(standard8) → review+
Thanks.
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/c01fd1da06d5
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 32.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: