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/build/cmd/release: tests broken #24874

Closed
kevinburke opened this issue Apr 15, 2018 · 2 comments
Closed

x/build/cmd/release: tests broken #24874

kevinburke opened this issue Apr 15, 2018 · 2 comments

Comments

@kevinburke
Copy link
Contributor

@kevinburke kevinburke commented Apr 15, 2018

Running "go test golang.org/x/build/cmd/release" currently fails with the following error:

# golang.org/x/build/cmd/release
cmd/release/releaselet_test.go:8:25: undefined: wixVersion
cmd/release/releaselet_test.go:24:25: undefined: wixVersion
cmd/release/releaselet_test.go:40:25: undefined: wixVersion
cmd/release/releaselet_test.go:56:5: undefined: wixIsWinXPSupported
cmd/release/releaselet_test.go:59:5: undefined: wixIsWinXPSupported
cmd/release/releaselet_test.go:62:5: undefined: wixIsWinXPSupported
cmd/release/releaselet_test.go:65:5: undefined: wixIsWinXPSupported
FAIL	golang.org/x/build/cmd/release [build failed]

wixVersion and friends are defined in cmd/release/releaselet.go which is protected by a // +build ignore file. Running the tests with -tags=ignore also fails:

$ go test -tags=ignore ./cmd/release
../net/http2/client_conn_pool.go:10:2: found packages tls (alert.go) and main (generate_cert.go) in /Users/kevin/go/src/crypto/tls
../../../google.golang.org/grpc/credentials/credentials.go:27:2: found packages x509 (cert_pool.go) and main (root_darwin_arm_gen.go) in /Users/kevin/go/src/crypto/x509
../../../../go/src/go/build/build.go:12:2: found packages doc (comment.go) and main (headscan.go) in /Users/kevin/go/src/go/doc
cmd/release/release.go:30:2: found packages build (build.go) and main (update-readmes.go) in /Users/kevin/src/golang.org/x/build
../text/secure/bidirule/bidirule.go:16:2: found packages bidi (bidi.go) and main (gen.go) in /Users/kevin/src/golang.org/x/text/unicode/bidi

What's the best way forward?

  • Proceed with a broken test suite (not ideal)
  • Change the build tag from ignore to something else, then give both releaselet.go and releaselet_test.go the new build tag.
  • Put the functions under test in a different file with a different build flag, then edit the build scripts to upload/run both releaselet.go and the new file.
  • Delete the tests.
  • Give the tests the ignore build tag and basically never run them.
  • Some other solution I'm not thinking of.

Thoughts?

@gopherbot gopherbot added this to the Unreleased milestone Apr 15, 2018
@gopherbot gopherbot added the Builders label Apr 15, 2018
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 15, 2018

Change https://golang.org/cl/106984 mentions this issue: cmd/release: fix tests

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 16, 2018

Change https://golang.org/cl/107303 mentions this issue: cmd/release: fix releaselet tests

@golang golang locked and limited conversation to collaborators Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.