-
Notifications
You must be signed in to change notification settings - Fork 271
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
introduce method to radically speed up unit tests #9314
base: main
Are you sure you want to change the base?
Conversation
…s where no unit tests exist and only integration tests are run
** WARNING **: This repository is generated by https://github.com/GoogleCloudPlatform/magic-modules. Any changes made directly to this repository will likely be overwritten. If you have further questions, please feel free to ping your reviewer or, internal employees, reach out to one of the engineers. Thank you! |
ehh, @melinath I tried to see if I could shave off some unit test runtime by excluding packages that don't have any. I was able to shave 2m off the runtime, but I don't think it's worth the introduced complexity. wdyt? |
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.
overall this seems reasonable to me - I wonder if it could make sense to merge parts of it into the mm test analysis code, since it's doing similar work?
Switching to bazel might make this obsolete but that's probably fine / that's a ways off.
Also, make sure to not add the binary to the PR.
@dirs=$$(go list -e $(TEST) | xargs -I {} go list -f '{{.Dir}}' {} | tr '\n' ' ' ); \ | ||
results=$$(./scripts/package-needs-unit-testing/pnut $$dirs); \ | ||
testable_packages=""; \ | ||
for result in $$results; do \ |
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'd rather have this logic in the Go code if possible.
by omitting packages where no unit tests exist and only integration tests are run