[MAINT]: Update GNUmakefile to enhance test command functionality#3020
[MAINT]: Update GNUmakefile to enhance test command functionality#3020deiga wants to merge 5 commits intointegrations:refactor-integration-testsfrom
Conversation
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
- 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.
It looks like CGO_ENABLED=0 has been missed from here?
There was a problem hiding this comment.
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.
Likely for readability/portability; the primary intent is much clearer with it defined inline.
There was a problem hiding this comment.
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>
241055a to
581b507
Compare
|
@deiga I'm not sure how I managed to close this (the GH UI has been causing me all kinds of trouble), would you like me to reopen it? |
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!