Closed Bug 1550052 Opened 5 years ago Closed 5 years ago

Local runs of 'mach gtest' on Android sometimes fail: gtest | org.mozilla.geckoview.test failed to start

Categories

(Testing :: GTest, defect)

Version 3
defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

gtest INFO | Running Android gtest
0:45.88 gtest INFO Granting important runtime permissions to org.mozilla.geckoview.test
0:47.30 gtest INFO launch_application: am start -W -n org.mozilla.geckoview.test/org.mozilla.geckoview.test.TestRunnerActivity -a android.intent.action.MAIN --es env9 MOZ_GTEST_CWD=/sdcard/tests/gtest-profile --es env8 MOZ_GTEST_MINIDUMPS_PATH=/sdcard/tests/gtest-minidumps --es args "-unittest --gtest_death_test_style=threadsafe -profile /sdcard/tests/gtest-profile" --es env3 GTEST_FILTER=* --es env2 XPCOM_DEBUG_BREAK=stack-and-abort --es env1 MOZ_TBPL_PARSER=1 --es env0 MOZ_CRASHREPORTER=1 --es env7 MOZ_CRASHREPORTER_NO_REPORT=1 --es env6 MOZ_RUN_GTEST=1 --es env5 MOZ_IN_AUTOMATION=1 --es env4 MOZ_GTEST_LOG_PATH=/sdcard/tests/gtest.log --ez use_multiprocess False
gtest TEST-UNEXPECTED-FAIL | gtest | org.mozilla.geckoview.test failed to start

Logcat shows "fennec : XRE_main returned 1".

This seemed to come about when org.mozilla.geckoview.test was already installed, then re-installed via 'mach gtest', resulting in multiple semi-installations of the test app:

generic_x86_64:/ # ls -l /data/app/org.mozilla*
/data/app/org.mozilla.geckoview.test-1:
total 8
drwxrwxr-x 2 root root 4096 2019-05-08 17:23 lib

/data/app/org.mozilla.geckoview.test-2:
total 130224
-rw-r--r-- 1 system system 66663714 2019-05-08 17:20 base.apk
drwxr-xr-x 3 system system 4096 2019-05-08 17:20 lib
drwxrwx--x 3 system install 4096 2019-05-08 17:20 oat
generic_x86_64:/ #

Probably associated with the hack for pushing libxul to device - bug 1544496.

Blocks: 1318091
See Also: → 1544496

Work-around:

adb uninstall org.mozilla.geckoview.test
adb shell rm -r /data/app/org.mozilla.geckoview.test*
mach gtest

Uninstalling the test app before re-installing ensures a clean, predictable
starting state for gtest.

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e3b4a30cfd7
Ensure clean android app install via mach; r=jmaher
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: