Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test: TestCreateAndStartEmulator. Fails to find installed systemImage #19

Open
joeblew99 opened this issue Jul 4, 2017 · 1 comment

Comments

@joeblew99
Copy link

joeblew99 commented Jul 4, 2017

The error is that it fails when checking if the android system image is installed.
I can see in Android Studio that the system image has been installed by this code.
This is a clean OSX machine.

If you need more info, just holler !

kicked off with this test:
https://github.com/bitrise-tools/go-android/blob/master/_tests/integration/integration_test.go#L45
func TestCreateAndStartEmulator(t *testing.T)

It fails at "
https://github.com/bitrise-tools/go-android/blob/master/_tests/integration/integration_test.go#L123


Reproduce:

Note i added some fmt.Println statements to the SDKManager.go: IsInstalled (line 56)

x-MacBook-Pro:integration apple$ go test -run TestCreateAndStartEmulator
relPath: platforms/android-24
indicatorFile:  
installPth:  /usr/local/Caskroom/android-sdk/25.2.3/platforms/android-24
relPath: system-images/android-24/google_apis/armeabi-v7a
indicatorFile:  system.img
installPth:  /usr/local/Caskroom/android-sdk/25.2.3/system-images/android-24/google_apis/armeabi-v7a
relPath: system-images/android-24/google_apis/armeabi-v7a
indicatorFile:  system.img
installPth:  /usr/local/Caskroom/android-sdk/25.2.3/system-images/android-24/google_apis/armeabi-v7a
--- FAIL: TestCreateAndStartEmulator (1.61s)
	integration_test.go:70: Create emulator: android-24 - google_apis - armeabi-v7a
	integration_test.go:111: Installing system image (platform: android-24 abi: armeabi-v7a tag: google_apis)
	integration_test.go:116: $ /usr/local/Caskroom/android-sdk/25.2.3/tools/bin/sdkmanager "system-images;android-24;google_apis;armeabi-v7a"
        Error Trace:    integration_test.go:123
	            	integration_test.go:52
	Error:      	Not equal: 
	            	expected: true
	            	received: false
FAIL
exit status 1

Env Variables

x-MacBook-Pro:integration apple$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build703713938=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Runtime variables
binPth
"/usr/local/Caskroom/android-sdk/25.2.3/tools/bin/sdkmanager"

@godrei
Copy link
Contributor

godrei commented Oct 26, 2017

Hi @joeblew99 ,
thanks for the report and sorry for my late response!

We introduced Virtual Device Testing for Android, which is more reliable solution to run android test: https://discuss.bitrise.io/t/how-to-run-android-ui-tests-on-virtual-devices/2496?u=godreikrisztian.
Currently we are focusing on the related step. However we will fix this issue later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants