-
Notifications
You must be signed in to change notification settings - Fork 912
[MAINT]: Update GNUmakefile to enhance test command functionality #3020
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
base: refactor-integration-tests
Are you sure you want to change the base?
[MAINT]: Update GNUmakefile to enhance test command functionality #3020
Conversation
- Renamed TESTARGS to COVERAGEARGS for clarity. - Added variable references and examples for test-specific variables. - Improved test and acceptance test commands to include branch information and coverage options. Signed-off-by: Timo Sand <timo.sand@f-secure.com>
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
| # commenting this out for release tooling, please run testacc instead | ||
| @branch=$$(git rev-parse --abbrev-ref HEAD); \ | ||
| printf "==> Running acceptance tests on branch: \033[1m%s\033[0m...\n" "🌿 $$branch 🌿" | ||
| go test $(TEST) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like CGO_ENABLED=0 has been missed from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Question: Is there a reason we don't just put export CGO_ENABLED=0 at the top of the makefile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely for readability/portability; the primary intent is much clearer with it defined inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that having a global export in the makefile obfuscates the usage of CGO_ENABLED slightly, but I don't see how it creates a problem with readability and portability.
It's not like we need/should encourage people to use commands outside of the makefile.
And it makes maintenance of the makefile a lot simpler, since it's unlikely to be forgotten from a new command that way
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Inspired by: https://github.com/hashicorp/terraform-provider-aws/blob/main/GNUmakefile
Before the change?
make testaccAfter the change?
make testacc T=TestAccFooCOV=truewhen calling a make commandPull request checklist
Schema migrations have been created if needed (example)Tests for the changes have been added (for bug fixes / features)Does this introduce a breaking change?
Please see our docs on breaking changes to help!