bind, cmd/gobind/test: remove GOOS build tags from test packages

The gobind command is about to get more powerful and able to generate
complete and standalone bindings. Platform specific build tags based
on GOOS or GOARCH are now meaningless to generate bindings from, so
remove them from the test packages.

The tags mattered to the reverse bound packages, since the go tool can't
build them without the Go wrappers for the imported Java packages.
Before this CL, the `android` tag was used to fool the go tool since
the host GOOS is unlikely to be android.

A fix is to check in the generated Go wrappers, but since the
packages are for testing we don't want that. Instead, move the test
packages to the testdata directory so the go tool ignores them.

Change-Id: I57178e930a400f690ebd7a65758bed894eeb10b0
Reviewed-on: https://go-review.googlesource.com/99315
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Elias Naur
2018-03-14 22:25:02 +00:00
parent f9a23313dd
commit f16143114e
13 changed files with 17 additions and 27 deletions
+5 -5
View File
@@ -23,21 +23,21 @@ func TestClasses(t *testing.T) {
t.Skipf("java importer is not available")
}
runTest(t, []string{
"golang.org/x/mobile/bind/testpkg/javapkg",
"golang.org/x/mobile/bind/testdata/testpkg/javapkg",
}, "", "ClassesTest")
}
func TestCustomPkg(t *testing.T) {
runTest(t, []string{
"golang.org/x/mobile/bind/testpkg",
"golang.org/x/mobile/bind/testdata/testpkg",
}, "org.golang.custompkg", "CustomPkgTest")
}
func TestJavaSeqTest(t *testing.T) {
runTest(t, []string{
"golang.org/x/mobile/bind/testpkg",
"golang.org/x/mobile/bind/testpkg/secondpkg",
"golang.org/x/mobile/bind/testpkg/simplepkg",
"golang.org/x/mobile/bind/testdata/testpkg",
"golang.org/x/mobile/bind/testdata/testpkg/secondpkg",
"golang.org/x/mobile/bind/testdata/testpkg/simplepkg",
}, "", "SeqTest")
}