Skip to content

Conversation

@deiga
Copy link
Contributor

@deiga deiga commented Dec 25, 2025

  • 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.

Inspired by: https://github.com/hashicorp/terraform-provider-aws/blob/main/GNUmakefile


Before the change?

  • No way to declare a granular test pattern for make testacc
  • Coverage ran for all test commands

After the change?

  • Able to declare a granular test pattern for make testacc T=TestAccFoo
  • Coverage is only run if COV=true when calling a make command

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

- 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>
@github-actions
Copy link

👋 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 Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@deiga deiga marked this pull request as ready for review December 25, 2025 22:35
@deiga deiga changed the title [MAIN]: Update GNUmakefile to enhance test command functionality [MAINT]: Update GNUmakefile to enhance test command functionality Dec 25, 2025
# 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) \
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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>
@deiga deiga requested a review from stevehipwell December 31, 2025 21:06
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@deiga deiga requested a review from stevehipwell January 4, 2026 19:51
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