Closed Bug 1558867 Opened 5 years ago Closed 5 years ago

Android 'mach gtest <test>' sometimes fails: gtest | org.mozilla.geckoview.test failed to start

Categories

(Testing :: GTest, defect)

57 Branch
defect
Not set
normal

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

mach gtest "APZ*"
...
gtest INFO | Running Android gtest
 1:02.95 gtest INFO Granting important runtime permissions to org.mozilla.geckoview.test
 1:06.71 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=APZ* --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

...but 'adb logcat' shows that the requested tests ran:

...
06-12 18:01:46.449 12701 12716 I gtest   : TEST-START | APZCSnappingTester.Snap_After_Pinch
06-12 18:01:46.450 12701 12716 I gtest   : TEST-PASS | APZCSnappingTester.Snap_After_Pinch | test completed (time: 0ms)
06-12 18:01:46.450 12701 12716 I gtest   : TEST-PASS | GTest unit test: passed
06-12 18:01:46.450 12701 12716 I gtest   : Passed: 30
06-12 18:01:46.450 12701 12716 I gtest   : Failed: 0
Depends on: 1318091

It looks like this is just a race on startup: If the log is not present when the harness first checks for it, and the remote app completes before the harness confirms it was running, no log is reported, and the harness times out waiting for startup.

This allows me to run 'mach gtest "APZ*"' and other short runs of gtest
that were previously failing.

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ec524b6ce7d
Report log for short runs of 'mach gtest'; r=bc
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: