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/tools/go/ssa: add support to CreateTestMainPackage for testing.M #9553

Closed
alandonovan opened this issue Jan 9, 2015 · 2 comments
Closed

Comments

@alandonovan
Copy link
Contributor

The generated code for packages using *testing.M is slightly different than for other tests.
The ssa package's function to synthesize testmain packages needs updating.

@alandonovan alandonovan self-assigned this Jan 9, 2015
@mikioh mikioh changed the title tools/go/ssa: add support to CreateTestMainPackage for testing.M go/ssa: add support to CreateTestMainPackage for testing.M Jan 10, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go/ssa: add support to CreateTestMainPackage for testing.M x/tools/go/ssa: add support to CreateTestMainPackage for testing.M Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@alandonovan
Copy link
Contributor Author

Note to self: do this after Go 1.6.

Also, think about an alternative approach to generating the testmain package. Half of the work can be done in a way that doesn't depend on SSA. For example, in typeutil, we could add utility functions that, given a *types.Package, return a struct describing the tests within it, or a generated source file containing a main function like what go test would generate. go/loader could be extended to create and type-check these packages automatically, and then the SSA package wouldn't need to know about them.

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Oct 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants