-
Notifications
You must be signed in to change notification settings - Fork 499
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
Allow invoker of make check
to test a subset of packages.
#13987
Conversation
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.
lgtm
Makefile
Outdated
@@ -279,7 +283,7 @@ test: run-tests | |||
run-tests: | |||
## run-tests: Run the unit tests | |||
$(eval TMP := $(shell mktemp -d $${TMPDIR:-/tmp}/jj-XXX)) | |||
$(eval TEST_PACKAGES := $(shell go list $(PROJECT)/... | grep -v $(PROJECT)$$ | grep -v $(PROJECT)/vendor/ | grep -v $(PROJECT)/acceptancetests/ | grep -v $(PROJECT)/generate/ | grep -v mocks)) | |||
$(eval TEST_PACKAGES := $(shell go list $(PROJECT)/... | sort | ([ -f $(TEST_PACKAGE_LIST) ] && comm -12 $(TEST_PACKAGE_LIST) - || cat) | grep -v $(PROJECT)$$ | grep -v $(PROJECT)/vendor/ | grep -v $(PROJECT)/acceptancetests/ | grep -v $(PROJECT)/generate/ | grep -v mocks)) |
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 think you can combine all the greps into a list with []
might read a bit better then?
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 tried this and it was more messy but less verbose, so sticking with the current one.
b6c2686
to
0441680
Compare
|
#14017 Merge from 2.9 to bring forward: - #14007 from wallyworld/update-golang-deps - #14013 from hmlanigan/show-controller-panic - #14012 from hmlanigan/remove-unit-subordinate - #13998 from turrisxyz/setup-permissions - #14011 from ycliuhw/update-ck-overlay - #14010 from tlm/juju-jenkins-tests - #14004 from tlm/juju-jenkins-tests - #14003 from manadart/2.9-close-unit-loggers - #14001 from jack-w-shaw/JUJU-1050_show_unit_life - #13890 from juju/dependabot/github_actions/actions/upload-artifact-3 - #14000 from wallyworld/use-go1.18 - #13999 from tlm/juju-jenkins-tests - #13991 from ycliuhw/fix/lp1968643 - #13997 from tlm/cross-compile - #13931 from arnodel/juju-885-remove-modelaccess-connection-iface-method - #13992 from jack-w-shaw/JUJU-1034_reduce_over_verbose_logging_network - #13993 from hmlanigan/fix-intermittent-fail-testenqueuedoperation - #13990 from wallyworld/handle-azure-quota-errors - #13989 from benhoyt/start-worker-if-dead - #13987 from hpidcock/filter-test-packages Conflicts: - cmd/juju/controller/showcontroller.go - go.mod - go.sum - provider/azure/environ_test.go
By passing
TEST_PACKAGE_LIST
env var set to the path of a file with sorted newline delimited package import paths,make check
will only test that subset.QA steps
make check
should still test all the packages it normally tests.This should test only the
github.com/juju/juju/api/client/application
package.echo github.com/juju/juju/api/client/application > test.list && TEST_PACKAGE_LIST=test.list make check && rm test.list
Documentation changes
N/A
Bug reference
N/A