Documentation
¶
Overview ¶
Command batchselect reports which test batches of one package a change can affect. The declarations of the packages named by -with, non-test packages that the test package imports (the integration harness), join the same graph, so a change there selects only the batches that reach it. It maps the diff since a base commit to the top-level declarations of the package's test build, and keeps a batch when one of its roots (its tests, and every init function and package-level var initializer) reaches a changed declaration in a reference graph that go/types resolves. Anything it cannot attribute to a declaration selects every batch, with the reason.
By default the checkout under -root is the head, and the diff is taken from the merge base of -base and HEAD to the working tree. With -head, -root holds that commit's tree, exported from the repository -repo.