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

cmd/dist: run all tests unless explicitly disabled on a platform #18503

Open
mundaym opened this issue Jan 3, 2017 · 3 comments
Open

cmd/dist: run all tests unless explicitly disabled on a platform #18503

mundaym opened this issue Jan 3, 2017 · 3 comments
Assignees
Milestone

Comments

@mundaym
Copy link
Member

@mundaym mundaym commented Jan 3, 2017

Every now and again a test isn't enabled on a platform where it should be (for example: 161cd34). A leading culprit of this is feature checks that only run a test if the GOOS/GOARCH combination is in a list:

pair := t.gohostos + "-" + t.goarch
switch (pair) {
case "android-arm", "darwin-arm", ...:
    // run test
default:
    // don't run test
}

If a GOOS/GOARCH combination isn't correctly added to one of the many lists like this, then the related tests simply won't run. This is not always obvious.

I think it would be good to refactor test.go so that it always defaults to running a test unless explicitly told not to for a given platform (preferably with an issue referencing the missing feature). This will make it harder to accidentally forget to enable a test.

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 3, 2017

SGTM

@bradfitz bradfitz added this to the Go1.9Maybe milestone Jan 3, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jun 28, 2017
@nilsmagnus

This comment has been minimized.

Copy link
Contributor

@nilsmagnus nilsmagnus commented Oct 25, 2017

Is it ok if I have a look at this @mundaym ?

@mundaym

This comment has been minimized.

Copy link
Member Author

@mundaym mundaym commented Oct 25, 2017

@nilsmagnus Yep, feel free!

@rsc rsc modified the milestones: Go1.10, Unplanned Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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