Open Bug 1544496 Opened 3 years ago Updated 2 years ago

geckoview gtest pushes to application directory


(GeckoView :: General, defect, P3)



(firefox68 affected)

Tracking Status
firefox68 --- affected


(Reporter: gbrown, Unassigned)



Bug 1318091 has enabled gtest on Android, running in the geckoview TestRunnerActivity.

gtest compiles tests into gtest/, which is not currently included in any apk. Currently the android gtest harness installs the TRA apk with the normal, non-test, then over-writes the installed with gtest/ That works in the well-controlled environment of continuous integration, but is otherwise quite fragile. Also, it assumes a root shell -- okay for the emulator, but problematic for tests on local devices, or even the android-hw test devices.

Would it make sense to have gtest/ included in the TRA apk? Create a separate apk for gtest??


Blocks: 1318091
No longer depends on: 1318091
OS: All → Android
Priority: -- → P3
See Also: → 1550052

:nalexander - Do you have an idea of how to solve this? Do you have time to look into it??

Flags: needinfo?(nalexander)

(In reply to Geoff Brown [:gbrown] from comment #1)

:nalexander - Do you have an idea of how to solve this? Do you have time to look into it??

I haven't much time to address this directly, but I can certainly provide some guidance.

A separate APK for gtest definitely is the most appealing: I'm leery of trying to override the location of conditionally. But a quick skim of the sources suggest it wouldn't be too hard: look for some gtest-specific environment variable here.

Arranging a separate APK is not hard, per se, but it's a burden: we'd need to make the geckoview Gradle project have a test APK for some product flavor that includes gtest. We're trying to minimize product flavors, which is in conflict with separate APKs.

So I suggest:

If you explain how the gtest/ gets produced I can help with the first step. I don't have a compiled objdir right now (really, ever) so I can't just see myself. Can I get these things from artifacts in some way, so that we can make this possible with an artifact build?

Flags: needinfo?(nalexander) → needinfo?(gbrown)

Thanks Nick!

The gtest harness sets various environment variables already,

For local runs, gtest/ usually gets built via the gtest mach command:

In CI, gtest/ gets built into the target.gtest.tests.tar.gz artifact; I don't know much about how that comes about.

Flags: needinfo?(gbrown)
Blocks: 1558885
You need to log in before you can comment on or make changes to this bug.