2
0
mirror of synced 2025-02-24 15:28:28 +00:00
Changkun Ou d82874c7e6 cmd/gomobile: fix flaky TestNdkRoot test
The current TestNdkRoot may fail if ANDROID_HOME and ANDROID_NDK_HOME
are both set from the environment. This is because ndkRoot will first
check ANDROID_HOME, if fails, then check ANDROID_NDK_HOME.

The test was intended to reset the ANDROID_HOME and expecting an error
for fetching ANDROID_NDK_HOME. However, if ANDROID_NDK_HOME is set,
the ndkRoot will not return an error, which may fail the test.

This change moves the environment settings around to permit TestNdkRoot
to pass.

Change-Id: I17ce6dbeec186d35f7a4ba2d8275a43a862c306d
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346152
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-31 15:17:20 +00:00
..
2020-01-23 02:49:29 +00:00