Closed
Bug 992983
Opened 11 years ago
Closed 9 years ago
Run gtest from test package rather than make check
Categories
(Testing :: General, defect)
Testing
General
Tracking
(firefox46 fixed)
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: dminor, Assigned: chmanchester)
References
(Blocks 2 open bugs)
Details
Attachments
(5 files)
(deleted),
text/x-review-board-request
|
BenWa
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
ted
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jlund
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jlund
:
review+
|
Details |
(deleted),
patch
|
chmanchester
:
review+
|
Details | Diff | Splinter Review |
We can probably add these to the cppunit job. We will need to package the gtest specific libxul.
Comment 1•11 years ago
|
||
Note glandium's bug 992323 comment 2, we currently link the gtest libxul binary on-demand during "make check", so we'll need to switch to doing that either during the build or during test packaging.
Reporter | ||
Comment 2•11 years ago
|
||
The gtest libxul binary (on linux64) is ~630MB unstripped, 70MB stripped, so this will have a big impact on test package size. We might not want to do this until we fix bug 917999.
Blocks: 1082193
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → cmanchester
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1185298 and bug 1185299 are XP only, so we don't need to address them to get to parity with the current tests (all the builders run the same OS, Windows Server 2008).
Assignee | ||
Comment 4•9 years ago
|
||
Bug 992983 - Build and upload the gtest libxul during test packaging.
Attachment #8647811 -
Flags: review?(ted)
Assignee | ||
Comment 5•9 years ago
|
||
Bug 992983 - Run gtests from mozharness' desktop_unittest.py
Attachment #8647812 -
Flags: review?(jlund)
Assignee | ||
Comment 6•9 years ago
|
||
https://reviewboard.mozilla.org/r/16051/#review14383
::: testing/mozharness/scripts/desktop_unittest.py:652
(Diff revision 1)
> + # We can trust the return code of gtests (even on Windows), so we set
> + # the status here regardless of the result of parsing test output.
> + if return_code != 0:
> + tbpl_status, log_level = TBPL_WARNING, WARNING
This is unfortunate. An alternative would be to implement a destkop_unittest style summary in gtest. I don't think that would be a lot of work if this seems to ugly to live.
Comment 7•9 years ago
|
||
https://reviewboard.mozilla.org/r/16049/#review14385
::: testing/testsuite-targets.mk:569
(Diff revision 1)
> + $(MAKE) -C $(DEPTH)/testing/gtest gtest
This is going to link the xul-gtest dll on windows PGO builds, which is going to essentially double to Windows PGO build times. See the comment in testing/gtest/Makefile.in
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
Bug 992983 - Build and upload the gtest libxul during test packaging.
Attachment #8647811 -
Flags: review?(ted)
Assignee | ||
Comment 9•9 years ago
|
||
https://reviewboard.mozilla.org/r/16049/#review14385
> This is going to link the xul-gtest dll on windows PGO builds, which is going to essentially double to Windows PGO build times. See the comment in testing/gtest/Makefile.in
I guess this patch needs to be re-worked so packaging the gtest xul can be turned off. I'll re-request review when it has.
Assignee | ||
Comment 10•9 years ago
|
||
https://reviewboard.mozilla.org/r/16051/#review14383
> This is unfortunate. An alternative would be to implement a destkop_unittest style summary in gtest. I don't think that would be a lot of work if this seems to ugly to live.
I'm leaning towards this... the little tinderboxprint'd is somewhat helpful.
Assignee | ||
Updated•9 years ago
|
Attachment #8647811 -
Attachment description: MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. → MozReview Request: Bug 992983 - Add test summary lines to gtest's automation-specific output format. r=benwa
Attachment #8647811 -
Flags: review?(bgirard)
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
Bug 992983 - Add test summary lines to gtest's automation-specific output format. r=benwa
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Attachment #8647812 -
Attachment description: MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py → MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Attachment #8647812 -
Flags: review?(jlund) → review?(ted)
Assignee | ||
Comment 13•9 years ago
|
||
Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Attachment #8648311 -
Flags: review?(jlund)
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
Bug 992983 - Add test summary lines to gtest's automation-specific output format. r=benwa
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Assignee | ||
Comment 16•9 years ago
|
||
Comment on attachment 8648311 [details]
MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Comment 17•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
https://reviewboard.mozilla.org/r/16049/#review14515
Ship It!
Attachment #8647811 -
Flags: review?(bgirard) → review+
Comment 18•9 years ago
|
||
Comment on attachment 8648311 [details]
MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
https://reviewboard.mozilla.org/r/16187/#review14547
this is impressive. I assume you must have run this locally as you seem to have covered all the angles. How would you like to try this out in automation? One branch, maybe cedar, than m-c wide?
Attachment #8648311 -
Flags: review?(jlund) → review+
Assignee | ||
Comment 19•9 years ago
|
||
(In reply to Jordan Lund (:jlund) from comment #18)
> Comment on attachment 8648311 [details]
> MozReview Request: Bug 992983 - Run gtests from mozharness'
> desktop_unittest.py r=jlund
>
> https://reviewboard.mozilla.org/r/16187/#review14547
>
> this is impressive. I assume you must have run this locally as you seem to
> have covered all the angles. How would you like to try this out in
> automation? One branch, maybe cedar, than m-c wide?
Thanks for the review. I've got it going on try, for instance: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d6a6f2fd7a92&exclusion_profile=false
Assignee | ||
Updated•9 years ago
|
Keywords: leave-open
Comment 20•9 years ago
|
||
Comment 21•9 years ago
|
||
Comment 22•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
https://reviewboard.mozilla.org/r/16051/#review15847
::: testing/gtest/Makefile.in:19
(Diff revision 3)
> +endif
Let's just rip out the `make check` bits entirely--there's already a `mach gtest` command, and that's what developers should be using.
::: testing/testsuite-targets.mk:427
(Diff revision 3)
> - web-platform \
> + web-platform
The $(NULL) is just there as a placeholder so you don't have to add/remove the line continuation when you add entries, you should just leave it.
::: testing/testsuite-targets.mk:573
(Diff revision 3)
> + $(MAKE) -C $(DEPTH)/testing/gtest gtest
I think we should probably just figure out how to build gtest as part of the build instead of during test packaging which is kind of weird (but not any weirder than building it during `make check` like we do now, honestly). This might make things complicated to fix stuff like bug 1055224. I'm fine with punting this to a followup to get this landed, just file it and note the bug number here in a FIXME comment.
::: toolkit/mozapps/installer/package-name.mk:141
(Diff revision 3)
> +ifneq (1_WINNT,$(MOZ_PGO)_$(OS_ARCH))
I think it would be nicer to make this a standalone variable somewhere, like BUILD_GTEST.
Attachment #8647812 -
Flags: review?(ted) → review+
Comment 23•9 years ago
|
||
https://reviewboard.mozilla.org/r/16049/#review15849
::: testing/gtest/mozilla/GTestRunner.cpp:38
(Diff revision 3)
> + printf("Failed: %d\n", aUnitTest.failed_test_count());
I wonder how hard it'd be to make gtests use structured logs?
Assignee | ||
Comment 24•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
Bug 992983 - Add test summary lines to gtest's automation-specific output format. r=benwa
Assignee | ||
Comment 25•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Assignee | ||
Comment 26•9 years ago
|
||
Comment on attachment 8648311 [details]
MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Assignee | ||
Comment 27•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Just a quick quick sanity check, I'm not entirely sure I addressed one of the previous comments in the intended fashion.
Attachment #8647812 -
Flags: review+ → review?(ted)
Comment 28•9 years ago
|
||
https://reviewboard.mozilla.org/r/16051/#review16123
Drive-by review
::: toolkit/mozapps/installer/upload-files.mk:752
(Diff revision 4)
> +ifdef BUILD_GTEST
Thanks to wildcards, you don't need the condition here, so you can move the setting of BUILD_GTEST from config.mk to testsuite-target.mk.
Assignee | ||
Comment 29•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
Dummy commit so mozreview will show an interdiff.
Attachment #8647811 -
Attachment description: MozReview Request: Bug 992983 - Add test summary lines to gtest's automation-specific output format. r=benwa → MozReview Request: Dummy commit so mozreview will show an interdiff.
Assignee | ||
Comment 30•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Assignee | ||
Comment 31•9 years ago
|
||
Comment on attachment 8648311 [details]
MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Updated•9 years ago
|
Attachment #8647812 -
Flags: review?(ted) → review+
Comment 32•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
https://reviewboard.mozilla.org/r/16051/#review16151
Comment 33•9 years ago
|
||
Comment 34•9 years ago
|
||
This has caused some widespread bustage.
Comment 35•9 years ago
|
||
Assignee | ||
Comment 36•9 years ago
|
||
We're running every preflight method independent of the suites specified -- some check whether there are relevant suites, others don't. I have a proper fix to only call preflight methods for specified suites I'll push to try when it opens.
Assignee | ||
Comment 37•9 years ago
|
||
Comment on attachment 8647811 [details]
MozReview Request: imported patch dummy.patch
imported patch dummy.patch
Attachment #8647811 -
Attachment description: MozReview Request: Dummy commit so mozreview will show an interdiff. → MozReview Request: imported patch dummy.patch
Assignee | ||
Comment 38•9 years ago
|
||
Comment on attachment 8647812 [details]
MozReview Request: Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Bug 992983 - Build and upload the gtest libxul during test packaging. r=ted
Assignee | ||
Comment 39•9 years ago
|
||
Comment on attachment 8648311 [details]
MozReview Request: Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Bug 992983 - Run gtests from mozharness' desktop_unittest.py r=jlund
Assignee | ||
Comment 40•9 years ago
|
||
Bug 992983 - Follow up to fix treatment of preflight methods in desktop_unittest.py r=jlund
Attachment #8658862 -
Flags: review?(jlund)
Assignee | ||
Comment 41•9 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #36)
> We're running every preflight method independent of the suites specified --
> some check whether there are relevant suites, others don't. I have a proper
> fix to only call preflight methods for specified suites I'll push to try
> when it opens.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7d59bc5deafa
Comment 42•9 years ago
|
||
Comment on attachment 8658862 [details]
MozReview Request: Bug 992983 - Follow up to fix treatment of preflight methods in desktop_unittest.py r=jlund
https://reviewboard.mozilla.org/r/18709/#review16815
thanks for the fix!
Attachment #8658862 -
Flags: review?(jlund) → review+
Comment 43•9 years ago
|
||
Comment 44•9 years ago
|
||
Assignee | ||
Comment 45•9 years ago
|
||
Try, with the patch from bug 1204148:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1ed4aab7ae26&exclusion_profile=false
Assignee | ||
Comment 46•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4d33dbac2f2d&exclusion_profile=false
If all goes well with the windows tests on this push this is ready to land.
Assignee | ||
Comment 47•9 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #46)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=4d33dbac2f2d&exclusion_profile=false
>
> If all goes well with the windows tests on this push this is ready to land.
That checks out. Will land this Monday.
Comment 48•9 years ago
|
||
Assignee | ||
Comment 49•9 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/c4d0768dd27d
We're dumping symbols for the gtest libxul as a result of this patch, which is good, because stacks from failing gtests can get symbols now, but it's bad, because we're hitting
Exception: Ambiguous symbol file for libxul.so
in fix_stack_using_bpsyms.py
Assignee | ||
Comment 50•9 years ago
|
||
I don't see a convenient way to get a fuller path out of the symbols package. A quick fix would be to just skip the gtest libxul for now, but the -x argument to symbolstore.py only takes the basename into account.
But it looks like changing from gtest/libxul.so to gtest/libxul-gtest.so doesn't break anything.
Comment 51•9 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #50)
> But it looks like changing from gtest/libxul.so to gtest/libxul-gtest.so
> doesn't break anything.
Renaming the file is going to entirely skip the tests.
Assignee | ||
Comment 52•9 years ago
|
||
The tests run and pass from libxul-gtest.so, but as glandium pointed out on irc binary components could fail in circumstances I haven't thought of due to the hard-coded file name for libxul in nsXPCOMPrivate.h.
Ted, do you have any advice on how we could deal with this (comment 49) from the symbols package?
Flags: needinfo?(ted)
Comment 53•9 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #52)
> The tests run and pass from libxul-gtest.so, but as glandium pointed out on
> irc binary components could fail in circumstances I haven't thought of due
> to the hard-coded file name for libxul in nsXPCOMPrivate.h.
It's not the only reason. The main reason is that binary components are linked against libxul, and will expect libxul to be loaded by the dynamic linker first. Which isn't a problem on linux, because it doesn't really care of the file name the library was loaded from (as long as its SONAME is the one expected by the binary component), but it definitely will be a problem on windows and maybe mac.
Comment 54•9 years ago
|
||
I think we can fix fix_stack_using_bpsyms to actually match symbols properly. The UUID that Breakpad uses is in the binary on all platforms. If we have the tools needed to read it out it should be fairly straightforward:
$ readelf -n ../debug-mozilla-central/toolkit/library/libxul.so | grep "Build ID"
Build ID: 91d9b0b504cd46224b3ce7069a271735992231b3
Mac:
$ otool -l ../debug-mozilla-central/toolkit/library/XUL | grep uuid
uuid CE4343B9-D4F9-3B90-878F-F3EC6E168FA7
Win:
$ dumpbin -HEADERS ../debug-mozilla-central/toolkit/library/xul.dll | grep RSDS
554CD6FD cv 4F 078CE440 78CD240 Format: RSDS, {C7D95017-4631-4BB2-9415-9462EEBAF9D
5}, 1, c:\build\debug-mozilla-central\toolkit\library\xul.pdb
...if we don't have readelf/otool/dumpbin installed on our test machines then it'll be a little bit more of a PITA, but we can either write some Python or C++ to grab the value. We used to have one for Linux, it wouldn't be hard to write one that worked for all platforms:
https://hg.mozilla.org/mozilla-central/annotate/f2253edf5fc4/toolkit/crashreporter/fileid/file_id.cc
Flags: needinfo?(ted)
Comment 55•9 years ago
|
||
I don't see exactly how, but is there a chance this might be causing the following OSX 10.10 opt mozmill failure in c-c?
13:21:45 INFO - ValueError: ('Missing distribution spec', '/builds/slave/test/build/tests/mozmill/resources/jsbridge')
13:21:45 INFO - Storing debug log for failure in /Users/cltbld/.pip/pip.log
13:21:45 WARNING - Return code: 2
13:21:45 FATAL - Could not install python package: /builds/slave/test/build/venv/bin/pip install --download-cache /builds/slave/test/build/venv/cache --timeout 120 --no-index --find-links http://pypi.pvt.build.mozilla.org.proxxy1.srv.releng.scl3.mozilla.com/pub --find-links http://pypi.pub.build.mozilla.org.proxxy1.srv.releng.scl3.mozilla.com/pub --find-links http://pypi.pvt.build.mozilla.org/pub --find-links http://pypi.pub.build.mozilla.org/pub /builds/slave/test/build/tests/mozmill/resources/jsbridge failed after 5 tries!
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 56•9 years ago
|
||
Doesn't look like it, but if backing out the patch fixes it I'll take a look.
Flags: needinfo?(cmanchester)
Comment 57•9 years ago
|
||
Comment 58•9 years ago
|
||
bugherder |
Comment 59•9 years ago
|
||
This busted comm-central builds:
make -C ./testing/gtest gtest
make[1]: Entering directory `/builds/slave/tb-c-cen-l64-ntly-000000000000/build/objdir-tb/testing/gtest'
make[1]: Nothing to be done for `/builds/slave/tb-c-cen-l64-ntly-000000000000/build/mozilla/testing/gtest/gtest'.
make[1]: Leaving directory `/builds/slave/tb-c-cen-l64-ntly-000000000000/build/objdir-tb/testing/gtest'
./config/nsinstall -D dist/test-stage/gtest/gtest_bin
cp -RL dist/bin/gtest dist/test-stage/gtest/gtest_bin
cp: cannot stat `dist/bin/gtest': No such file or directory
make: *** [stage-gtest] Error 1
Updated•9 years ago
|
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 60•9 years ago
|
||
Adding the appropriate condition to testsuite-targets.mk[1] would keep us from attempting to package this on comm-central.
[1] https://hg.mozilla.org/mozilla-central/file/3c6ab47a14b2/testing/testsuite-targets.mk#l416
Flags: needinfo?(cmanchester)
Comment 61•9 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #60)
> Adding the appropriate condition to testsuite-targets.mk[1] would keep us
> from attempting to package this on comm-central.
Given https://hg.mozilla.org/mozilla-central/file/3c6ab47a14b2/testing/gtest/Makefile.in#l10, wouldn't the appropriate condition in https://hg.mozilla.org/mozilla-central/file/3c6ab47a14b2/testing/testsuite-targets.mk#l37 be
ifneq (browser,$(MOZ_BUILD_APP))
BUILD_GTEST=
endif
rather than the current one?
(Otherwise, I suppose one could add ifdef MOZ_THUNDERBIRD etc.)
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 62•9 years ago
|
||
I suppose it would. Will fix in a follow up.
Flags: needinfo?(cmanchester)
Comment 63•9 years ago
|
||
Thanks! Here's a patch that might be enough, unless you want to modify other things too.
Attachment #8707604 -
Flags: review?(cmanchester)
Updated•9 years ago
|
Assignee: cmanchester → aleth
Status: NEW → ASSIGNED
Assignee | ||
Comment 64•9 years ago
|
||
Comment on attachment 8707604 [details] [diff] [review]
Followup to make BUILD_GTEST consistent with the gtest makefile ifdef
Review of attachment 8707604 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me.
Attachment #8707604 -
Flags: review?(cmanchester) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: leave-open
Comment 66•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/589761e5c8173337e82b7635f7a42cc3bcc9884e
Bug 992983 - Followup to make BUILD_GTEST consistent with the gtest makefile ifdef. r=chmanchester
Updated•9 years ago
|
Assignee: aleth → cmanchester
Comment 67•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•