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

Makefile: add env var to enable args to test cmd #20299

Closed

Conversation

meowsbits
Copy link
Contributor

@meowsbits meowsbits commented Nov 15, 2019

This allows make command to handle passing -coverage and other arbitrary
flags to the go command.

Usage:

> make testargs=foo test

eg.

> make testargs=./core test # Test only ./core package
> make testargs='-coverage' test # Include coverage info

Usage:
> make testargs=foo test

This allows make command to handle -coverage and other arbitrary
flags to the go command.
@karalabe
Copy link
Member

I'm not really sure we want to make the Makefile any smarter. Originally all our builds were script driven and it became unusable, so we've rewritten the whole thing in Go, and made CI, builders, testers just call a single Go command.

I know that this step just makes calling that Go command a bit easier, but wouldn't it be simpler for yourself to just call go run build/ci.go <args> yourself instead of extending make?

@karalabe
Copy link
Member

Ping @fjl if you feel one way or another.

@meowsbits
Copy link
Contributor Author

Yea, I hear on the go vs make command. This change is related to #20298, and I just found it useful to be able to 'live in' the make command during development instead of switching back and forth, or writing custom scripts that duplicate Makefile functionality.

@meowsbits
Copy link
Contributor Author

But my heart's not set on it either way. It just seemed like a very tiny low-maintenance self-documenting addition that opens a lot of doors for the command.

@karalabe
Copy link
Member

opens a lot of doors for the command

That's exactly what we'd like to avoid :)

Make is mostly a crutch to help newcomers, but it's not the recommended way to work with the code base. It was a lot more important way back when our builders were based on scripts (and we had C dependencies). Now almost everything is Go and with Go modules coming, even more can be deleted. I think the general direction is getting rid of all non-Go workflows, so I'd rather not make make more useful :P

@karalabe karalabe closed this Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants