"make package-tests" doesn't work right on OS X universal builds

RESOLVED FIXED in mozilla1.9.3a1

Status

()

Core
Build Config
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: jrmuizel, Assigned: ted)

Tracking

Trunk
mozilla1.9.3a1
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(status1.9.2 beta5-fixed, status1.9.1 .10-fixed)

Details

Attachments

(5 attachments)

(Reporter)

Description

8 years ago
Error 0 (Unknown error: 0).35957 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/bugs/test_bug427744.html | Should have seen the test plugin
47332 ERROR TEST-UNEXPECTED-FAIL | /tests/layout/generic/test/test_plugin_mouse_coords.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - p1.getLastMouseX is not a function
lastScript86495 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_npobject_getters.html | plugin1.pluginFoundElement (NPNVPluginElementNPObject)
86496 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_npobject_getters.html | window.pluginFoundWindow (NPNVWindowNPObject)
86499 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_pluginstream_asfile.html | Test timed out.
86502 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_pluginstream_asfileonly.html | Test timed out.
86505 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_pluginstream_geturl.html | Test timed out.
86508 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_pluginstream_geturlnotify.html | Test timed out.
86509 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | 4 test timeouts, giving up.
86510 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | Skipping 159 remaining tests.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1253812968.1253815919.30710.gz
This happened on the newly-introduced opt machines, which run builds without --enable-logrefcnt.
(Assignee)

Comment 2

8 years ago
This is probably a packaging or harness error. Note the first error is "Should have seen the test plugin", so somehow the test plugin is not being loaded in these tests. I'm going to move this over to RelEng for investigation, catlee and I will take a look at it.
Component: Plug-ins → Release Engineering
Product: Core → mozilla.org
QA Contact: plugins → release
Version: Trunk → other
(Assignee)

Comment 3

8 years ago
I've hidden the OSX opt unittest builds on Firefox-Unittest for the time being.
(Assignee)

Updated

8 years ago
Summary: TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/bugs/test_bug427744.html | Should have seen the test plugin → TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/bugs/test_bug427744.html | Should have seen the test plugin on OS X opt unittests
(Assignee)

Comment 4

8 years ago
$ file bin/plugins/Test.plugin/Contents/MacOS/libnptest.dylib 
bin/plugins/Test.plugin/Contents/MacOS/libnptest.dylib: Mach-O dynamically linked shared library ppc

Yeah, that'd be our problem. I guess the test packages just don't currently work right on universal builds. The test plugin that's being packaged is PPC, which clearly doesn't work. On a related note, everything in bin/ is also ppc, including xpcshell. I guess this works because they'll get run in Rosetta (which is kind of insane), and libxul and everything are universal binaries, so that works, but an x86 Firefox trying to load a PPC plugin fails.
(Assignee)

Comment 5

8 years ago
Going to have to make 'make package-tests' have a special case for universal builds, just like 'make package'.
Assignee: nobody → ted.mielczarek
Component: Release Engineering → Build Config
Product: mozilla.org → Core
QA Contact: release → build-config
Version: other → Trunk
(Assignee)

Updated

8 years ago
Summary: TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/bugs/test_bug427744.html | Should have seen the test plugin on OS X opt unittests → "make package-tests" doesn't work right on OS X universal builds
(Assignee)

Comment 6

8 years ago
Created attachment 403252 [details] [diff] [review]
Step 1: fix unify to not choke on Java .class files

I had to fix this first. The unify script currently chokes on Java .class files, which we apparently have hiding in our test suites somewhere. The reason is that Mach-O fat binaries and Java .class files use the same magic number, and unify detects fat binaries by magic number. This patch fixes unify, and adds some basic unit tests of this behavior.
Attachment #403252 - Flags: review?(benjamin)
(Assignee)

Comment 7

8 years ago
Created attachment 403255 [details] [diff] [review]
Step 2: unify test packages in postflight makefile

This makes the universal postflight makefile build arch-specific test packages, and then unify them to dist/universal/test-package-stage, very similar to what we do with the app package. It then adds some special-casing to the "make package-tests" target, such that universal builds will just package up the bits that we staged in the postflight makefile.

This produces a plausible-looking test package, with universal binaries. I haven't tried actually running tests on it yet, nor have I tried running "package-tests" on a non-universal build with this patch yet.
Attachment #403255 - Flags: review?(benjamin)
(Assignee)

Comment 8

8 years ago
Some basic testing of the packaged build + test package show that the tests mentioned in comment 0 pass.
Attachment #403252 - Flags: review?(benjamin) → review+
Attachment #403255 - Flags: review?(benjamin) → review+
(Assignee)

Comment 9

8 years ago
Pushed to m-c:
http://hg.mozilla.org/mozilla-central/rev/5642cd4a7e88
http://hg.mozilla.org/mozilla-central/rev/07837dc569c6

Hopefully this should make the OS X opt unittest runs go green, and we can un-hide them!
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

8 years ago
jhford hit bustage on a XULRunner universal build. This needs a followup to move the two cp lines here inside the if:
http://mxr.mozilla.org/mozilla-central/source/build/macosx/universal/flight.mk#118
The second time a builder tries to unify the packaged tests it fails with
/builds/moz2_slave/mozilla-central-macosx/build/build/macosx/universal/unify: makeUniversal: mkdir: File exists for:
  obj-firefox/ppc/dist/universal/test-package-stage
Three builds have failed like this now, eg
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1254357655.1254360964.4557.gz

flight.mk has a rm -f for the universal app at 
  http://hg.mozilla.org/mozilla-central/file/07837dc569c6/build/macosx/universal/flight.mk#l106
but there's no equivalent for packaged tests.
Created attachment 403952 [details] [diff] [review]
Step 3. Followup for bustage during 2nd build

http://hg.mozilla.org/mozilla-central/rev/3914654341be
Attachment #403952 - Flags: review?(ted.mielczarek)
(Assignee)

Comment 13

8 years ago
Comment on attachment 403952 [details] [diff] [review]
Step 3. Followup for bustage during 2nd build

Thanks, I noticed that yesterday but didn't have time to fix it. (Along with comment 10.)
Attachment #403952 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 14

8 years ago
Pushed another bustage fix followup:
http://hg.mozilla.org/mozilla-central/rev/ab3ee8fc063d
(Assignee)

Updated

8 years ago
Blocks: 486783, 457753
(Assignee)

Comment 15

8 years ago
Comment on attachment 403252 [details] [diff] [review]
Step 1: fix unify to not choke on Java .class files

We need these patches on 1.9.2 in order to enable unit tests on nightly and release builds for OS X. This patch touches some build machinery, but also has unit tests. Should have no impact on the bits we ship.
Attachment #403252 - Flags: approval1.9.2?
(Assignee)

Comment 16

8 years ago
Comment on attachment 403255 [details] [diff] [review]
Step 2: unify test packages in postflight makefile

We need these patches on 1.9.2 in order to enable unit tests on nightly and release builds for OS X. This patch touches some build machinery, but only in ways that involve the test package. Should have no impact on the bits we ship.
Attachment #403255 - Flags: approval1.9.2?
Comment on attachment 403252 [details] [diff] [review]
Step 1: fix unify to not choke on Java .class files

a192=beltzner, would prefer if you could land in the morning EST so if it causes problems you can back it out before the PSTers get up.
Attachment #403252 - Flags: approval1.9.2? → approval1.9.2+
Comment on attachment 403255 [details] [diff] [review]
Step 2: unify test packages in postflight makefile

a192=beltzner, would prefer if you could land in the morning EST so if it causes problems you can back it out before the PSTers get up.
Attachment #403255 - Flags: approval1.9.2? → approval1.9.2+
(Assignee)

Comment 19

8 years ago
Pushed to 1.9.2:
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/7c4620338422
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/c0b78865c85e
(the latter changeset is a rollup of the "Step 2" patch, the "Step 3" patch, and the bustage fix from comment 14).
status1.9.2: --- → final-fixed
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.3a1
Created attachment 429398 [details] [diff] [review]
(Dv1) flight.mk: formatting nits
Attachment #429398 - Flags: review?(ted.mielczarek)
Created attachment 429399 [details] [diff] [review]
(Ev1-CC) Port it to comm-central
[Checkin: Comment 23]
Attachment #429399 - Flags: review?(bugspam.Callek)
(Assignee)

Comment 22

7 years ago
Comment on attachment 429398 [details] [diff] [review]
(Dv1) flight.mk: formatting nits

Really, I don't care.
Attachment #429398 - Flags: review?(ted.mielczarek) → review-

Updated

7 years ago
Attachment #429399 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 429399 [details] [diff] [review]
(Ev1-CC) Port it to comm-central
[Checkin: Comment 23]


http://hg.mozilla.org/comm-central/rev/e8064a410e5b
Attachment #429399 - Attachment description: (Ev1-CC) Port it to comm-central → (Ev1-CC) Port it to comm-central [Checkin: Comment 23]
Blocks: 506493
Blocks: 526817
fixed1.9.1.10 in bug 526668...
Blocks: 526668
status1.9.1: --- → .10-fixed
Blocks: 559088
You need to log in before you can comment on or make changes to this bug.