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
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mundaym
Copy link
Member

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
Copy link
Contributor

bradfitz commented Jan 3, 2017

SGTM

@bradfitz bradfitz added this to the Go1.9Maybe milestone Jan 3, 2017
@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jun 28, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jun 28, 2017
@nilsmagnus
Copy link
Contributor

nilsmagnus commented Oct 25, 2017

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

@mundaym
Copy link
Member Author

mundaym commented Oct 25, 2017

@nilsmagnus Yep, feel free!

@rsc rsc modified the milestones: Go1.10, Unplanned Nov 29, 2017
@rsc rsc unassigned mundaym Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants