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

x/mobile: document the requirements for running tests #19046

Closed
8tt opened this issue Feb 12, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@8tt
Copy link

commented Feb 12, 2017

I'm trying to figure out why x/mobile tests are failing with my setup. Below is a list of failing tests, not sure what is the reason.

go version go1.7.4 darwin/amd64
gomobile version +60b0aaa Tue Jan 31 20:25:16 2017 +0000 (android,ios); androidSDK=
macOS 10.12.3

What did you do?

# rm -rf $GOPATH/pkg
# rm -rf $GOPATH/src/golang.org/x/mobile
go get golang.org/x/mobile/cmd/gomobile
gomobile init
go test golang.org/x/mobile/... > test-results.txt 2>&1
cat test-results.txt | grep FAIL

What did you expect to see?

No failing tests.

What did you see instead?

--- FAIL: TestGenJava (5.58s)

--- FAIL: TestGenGoJavaWrappers (4.73s)
FAIL
FAIL	golang.org/x/mobile/bind	16.650s
--- FAIL: TestObjcSeqBench (9.76s)
		** TEST FAILED **
		** TEST FAILED **
FAIL
FAIL	golang.org/x/mobile/bind/objc	45.692s
--- FAIL: TestGobind (3.73s)
    --- FAIL: TestGobind/ObjC-Testpkg (0.04s)
    --- FAIL: TestGobind/Java-Testpkg (0.05s)
    --- FAIL: TestGobind/Go-Testpkg (0.04s)
    --- FAIL: TestGobind/Java-Javapkg (1.44s)
    --- FAIL: TestGobind/Go-Javapkg (1.08s)
FAIL
FAIL	golang.org/x/mobile/cmd/gobind	3.740s
--- FAIL: TestInit (2.25s)
FAIL
FAIL	golang.org/x/mobile/cmd/gomobile	4.832s
FAIL	golang.org/x/mobile/exp/gl/glutil [build failed]
--- FAIL: TestImport (0.53s)
FAIL
FAIL	golang.org/x/mobile/internal/importers/java	0.537s
--- FAIL: TestImport (0.03s)
FAIL
FAIL	golang.org/x/mobile/internal/importers/objc	0.037s

Full output (7000 lines)
https://gist.github.com/8tt/996bac25dfd29f950e30a0f60c9cce81

/cc @eliasnaur @crawshaw @hyangah

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37318 mentions this issue.

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37320 mentions this issue.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2017

I'm not sure why the java_test.go:71 test is getting 2 classes instead of 1. Could you try

https://go-review.googlesource.com/c/37320/

and see if that fixes that particular test? If not, could you paste the output from javap -J-Duser.language=en -s -protected -constants java.lang.Object and javap -J-Duser.language=en -s -protected -constants java.lang.Runnable on the system that fails the java_test.go:71 test? Thanks.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2017

Also, please re-run the test suite after running go install golang.org/x/mobile/cmd/... (to make sure the gobind and gomobile binaries are up-to-date).

gopherbot pushed a commit to golang/mobile that referenced this issue Feb 21, 2017

Elias Naur
internal/importers: fix test
Updates golang/go#19046

Change-Id: I51990a3e023d0a5339df72cc372565eecf5798e1
Reviewed-on: https://go-review.googlesource.com/37318
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37321 mentions this issue.

@8tt

This comment has been minimized.

Copy link
Author

commented Feb 21, 2017

Thanks, I've re-run the tests using https://go-review.googlesource.com/c/37320/ (184897121af27bc8e7d8edfd50f297e81db2f132).

The java test (java_test.go:71: got 2 classes, expected 1) finishes successfully.

Output of javap -J-Duser.language=en -s -protected -constants java.lang.Object and javap -J-Duser.language=en -s -protected -constants java.lang.Runnable
https://gist.github.com/8tt/9db6b9753f67e08820a5d3330a83fec7

Full test output:
https://gist.github.com/8tt/57750ee50cf2f69c1f9b53a090700ec6

--- FAIL: TestGobind (32.65s)
    --- FAIL: TestGobind/ObjC-Testpkg (0.04s)
    --- FAIL: TestGobind/Java-Testpkg (0.05s)
    --- FAIL: TestGobind/Go-Testpkg (0.03s)
FAIL
FAIL	golang.org/x/mobile/cmd/gobind	32.657s
--- FAIL: TestInit (1.97s)
FAIL
FAIL	golang.org/x/mobile/cmd/gomobile	4.221s
FAIL	golang.org/x/mobile/exp/gl/glutil [build failed]
--- FAIL: TestImport (0.03s)
FAIL
FAIL	golang.org/x/mobile/internal/importers/objc	0.037s

gopherbot pushed a commit to golang/mobile that referenced this issue Feb 21, 2017

Elias Naur
internal/importers: always specify classpath to javap
To avoid picking up a classpath from the CLASSPATH environment
variable, always specify an explicit classpath to javap, even if is
empty.

Updates golang/go#19046.

Change-Id: I2b3d941ba2779f90654117a046ae1600a53d5848
Reviewed-on: https://go-review.googlesource.com/37320
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>

gopherbot pushed a commit to golang/mobile that referenced this issue Feb 21, 2017

Elias Naur
exp/gl/glutil: disable test
The test broke a long time ago when the underlying API changed.
It seems too useful to remove outright, so disable it until someone
cares enough to update it.

Updates golang/go#19046.

Change-Id: Iec49be30fbc2e3ffd6fa73e584b15a481751049f
Reviewed-on: https://go-review.googlesource.com/37321
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37326 mentions this issue.

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37327 mentions this issue.

gopherbot pushed a commit to golang/mobile that referenced this issue Mar 3, 2017

Elias Naur
cmd/gomobile: fix openal init test
Updates golang/go#19046

Change-Id: I0fc8fedc179d24ec9691528cab98857f3f9a4291
Reviewed-on: https://go-review.googlesource.com/37327
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>

gopherbot pushed a commit to golang/mobile that referenced this issue Mar 7, 2017

Elias Naur
cmd/gobind: update export data for imported packages
CL 30093 removed the go install step from gobind to avoid errors from
circular dependencies with Java reverse wrapper. However, if a
dependency is either never installed or outdated, gobind will fail.

Reinstate the go install step, but ignore errors from the go install
tool.

Tested manually by wiping the $GOPATH/pkg directory and running the
cmd/gobind tests.

Updates golang/go#19046

Change-Id: I31832eccab09b2a7cf29e5d5bc1cc76963b7c2ef
Reviewed-on: https://go-review.googlesource.com/37326
Reviewed-by: David Crawshaw <crawshaw@golang.org>
@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2017

Several tests have been fixed; can you try again and see if any still fail for you?

@ALTree ALTree added this to the Unreleased milestone Mar 9, 2017

@8tt

This comment has been minimized.

Copy link
Author

commented Mar 15, 2017

All tests pass now. Thank you.

golang/mobile@eb90329

@eliasnaur eliasnaur closed this Mar 15, 2017

@golang golang locked and limited conversation to collaborators Mar 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.