Run GTest on Android x86_64
Categories
(GeckoView :: General, enhancement, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: gbrown, Assigned: gbrown)
References
(Depends on 1 open bug)
Details
Attachments
(8 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
We should run these tests on the x86_64 servers. snorp says we don't probably need to run them on the Pixel 2 devices.
Comment 11•6 years ago
|
||
(In reply to David Bolter [:davidb] (NeedInfo me for attention) from comment #10)
Stuart, who could own this?
Geoff Brown on the Automation team has been enabling GeckoView tests as they become green, but according to comment 3 and 4, additional work is needed to compile the gtest runner for Android. I don't know if that is the responsibility of the Automation team or the GeckoView team.
Assignee | ||
Comment 12•6 years ago
|
||
:jchen previously (comment 4) identified that the gtest libxul library was not built for android. Today, for android x86_64, 'mach gtest' does build toolkit/library/gtest/libxul.so, apparently successfully. The test command still fails due to desktop assumptions, but I may be able to make progress now.
(Still interested in sphilp's input -- would be happy to hand this off if someone else is available.)
Comment 13•6 years ago
|
||
Geoff, perhaps you can you investigate and see what work is remaining? If there are specific asks for the Geckoview team we can work with dbolter to get them resolved. I'll defer to Joel re: whether to assign this to you as he knows better what's in flight/backlog, but from where I'm sitting it makes sense for you to pick this up at least for the investigation and then we can figure out how to divvy up anything that comes out of it (between yourself, dbolters team, egao, others). NI to Joel in case there are other plans here :)
Comment 14•6 years ago
|
||
we have a list of other work in progress to get running on Android. As GTest has never run on android there are many unknowns, and I would estimate a 3 week project. if this is a priority we can move it up, otherwise I suspect we will start work on this in Q1, maybe finish if there are not big hurdles. At least we can comment on the feasibility in the coming weeks as well as ask for help as needed.
Right now marionette and cppunittests are in progress. :gbrown, should this bug block bug 1473368 ?
Assignee | ||
Comment 15•6 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC-4) from comment #14)
:gbrown, should this bug block bug 1473368 ?
No, I don't think so, because 1473368 is focused on reducing existing tests; let's go with see also.
Assignee | ||
Comment 16•6 years ago
|
||
Sorry, I haven't been finding much time for this bug. I did demonstrate, in bug 1532695, a proper android gtest build, but today builds are failing, apparently unrelated to my changes.
I have realized that once the builds are okay and the remote script can launch TRA in gtest mode, there will be an issue with output processing. rungtests.py monitors firefox's standard output; an equivalent for android might be monitoring logcat, but that will have system messages, etc mixed in -- perhaps not appropriate. Also, we haven't tried monitoring logcat from python in real time before. I wonder if gtest output can be redirected to a file, which could be polled, similar to android mochitest/reftest? I'll look into that once I've demonstrated gtest running on android.
Comment 17•6 years ago
|
||
In addition to existing gtests as mentioned in comment #8, it would be good to be able to write new unit tests using gtest and get coverage on Android. I just ran into this with bug 1479960, where there's some Android-specific code (and I encountered some Android-specific bugs); the gtests aren't critical in that case but I was surprised that we didn't already run them.
Assignee | ||
Comment 18•6 years ago
|
||
More than a few hacks here, but got a green build, invoked the new gtest script, and started geckoview TRA with gtest arguments:
but no tests are run and gecko just exits:
03-29 22:16:40.270 2347 2363 I fennec : XRE_main returned 1
03-29 22:16:40.270 2347 2363 D GeckoThread: State changed to EXITED
Assignee | ||
Comment 19•6 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #18)
but no tests are run and gecko just exits:
because the gtest entry point is not found...because the gtest libxul.so hasn't been built into the app (TRA is using the wrong libxul.so).
Assignee | ||
Comment 20•6 years ago
|
||
With the correct libxul.so hacked in, we get further, but then crash:
Assignee | ||
Comment 21•6 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #20)
With the correct libxul.so hacked in, we get further, but then crash:
That disappeared with harness changes + a new base revision.
Assignee | ||
Comment 22•6 years ago
|
||
Running tests, with some failures and crashes, and output only in logcat:
Assignee | ||
Comment 23•6 years ago
|
||
Assignee | ||
Comment 24•6 years ago
|
||
Green on opt and debug (but did I break desktop?):
Assignee | ||
Comment 25•6 years ago
|
||
Assignee | ||
Comment 26•6 years ago
|
||
Disable gtests observed to fail on Android. Some of these are simple build
failures and failures due to file permissions or paths, while other failures
are more obscure.
Once Android gtests are running on mozilla-central, I will file follow-up
bugs inviting teams to investigate the failures and re-enable Android gtests
that are important to them.
Assignee | ||
Updated•6 years ago
|
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
bugherder |
Assignee | ||
Comment 29•6 years ago
|
||
On Android, update mozilla gtest logging so that logging appears in the Android logcat.
Also, when MOZ_GTEST_LOG_PATH is defined in the environment, create the named file
and direct logging to that file. Android gtest will use this to collect gtest logging from
the device and copy it to the test log.
Assignee | ||
Comment 30•6 years ago
|
||
Desktop gtest creates minidumps in the current working directory. That is
problematic on Android, since the test app's cwd may not be writable, or
may not be readable by the test harness. This patch allows the test harness
to specify an alternate minidump path with environment variable
MOZ_GTEST_MINIDUMPS_PATH.
Assignee | ||
Comment 31•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 32•6 years ago
|
||
Assignee | ||
Comment 33•6 years ago
|
||
The jemalloc tests leave behind minidumps. Disable for now, for a green run.
Assignee | ||
Comment 34•6 years ago
|
||
Add Android 7.0 gtests, opt and debug, running against the geckoview
TestRunnerActivity.
Comment 35•6 years ago
|
||
Comment 36•6 years ago
|
||
bugherder |
Comment 37•6 years ago
|
||
Comment 38•6 years ago
|
||
bugherder |
Comment 39•6 years ago
|
||
Comment 40•6 years ago
|
||
Comment 41•6 years ago
|
||
bugherder |
Assignee | ||
Comment 42•6 years ago
|
||
Support --shuffle and <gtest_filter> for android gtest.
Comment 43•5 years ago
|
||
Comment 44•5 years ago
|
||
bugherder |
Assignee | ||
Comment 45•5 years ago
|
||
Add basic support for 'mach gtest' on Android.
Handling of Android-only and desktop-only options is awkward; I hope to
re-visit this after bug 1519369.
Comment 46•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 47•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•