1
0
mirror of https://github.com/golang/go synced 2024-11-14 13:20:30 -07:00
go/misc/android
Elias Naur 09eedc32e1 misc/android: make the exec wrapper exit code parsing more robust
Before, the Android exec wrapper expected the trailing exit code
output on its own line, like this:

PASS
exitcode=0

However, some tests can sometimes squeeze in some output after
the test harness outputs "PASS" and the newline. The
TestWriteHeapDumpFinalizers test is particularly prone to this,
since its finalizers println to standard out. When it happens, the
output looks like this:

PASS
finalizedexitcode=0

Two recent failures caused by this race:

https://build.golang.org/log/185605e1b936142c22350eef22d20e982be53c29
https://build.golang.org/log/e61cf6a050551d10360bd90be3c5f58c3eb07605

Since the "exitcode=" string is always echoed after the test output,
the fix is simple: instead of looking for the last newline in the
output, look for the last exitcode string instead.

Change-Id: Icd6e53855eeba60b982ad3108289d92549328b86
Reviewed-on: https://go-review.googlesource.com/23750
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2016-06-08 05:24:53 +00:00
..
cleaner.go misc/android: cleaner to remove stale GOROOT files 2015-05-25 20:52:10 +00:00
go_android_exec.go misc/android: make the exec wrapper exit code parsing more robust 2016-06-08 05:24:53 +00:00
README misc/android: choose the right subdirectory for bin under GOPATH. 2015-01-16 22:02:52 +00:00

Android
=======

For details on developing Go for Android, see the documentation in the
mobile subrepository:

	https://github.com/golang/mobile

To run the standard library tests, see androidtest.bash. Run it as

	CC_FOR_TARGET=.../ndk-gcc GOARCH=arm GOARM=7 ./androidtest.bash