Use grep's text mode when locating tests matching TEST_FILTER.
The search is restricted to *_test.go files, which are known to be text.
Using -I allowed grep's binary-file detection heuristic to silently ignore
matching source files, causing the corresponding integration test suites to
be skipped.
For example, grep may report a Go test file:
$ grep -nE 'func .*TestRunWriteSpecialFilesAndNotCommit.*' \
integration-cli/docker_cli_run_test.go
grep: integration-cli/docker_cli_run_test.go: binary file matches
Forcing text mode finds the expected test:
$ grep -anE 'func .*TestRunWriteSpecialFilesAndNotCommit.*' \
integration-cli/docker_cli_run_test.go
1713:func (s *DockerCLIRunSuite) TestRunWriteSpecialFilesAndNotCommit(c *testing.T) {
This caused TEST_FILTER not to find a test, and skipping all tests;
make TEST_FILTER=TestRunWriteSpecialFilesAndNotCommit test-integration
...
---> Making bundle: test-integration (in bundles/test-integration)
Skipping integration tests since the supplied filter "TestRunWriteSpecialFilesAndNotCommit" omits all integration tests
Skipping integration-cli tests since the supplied filter "TestRunWriteSpecialFilesAndNotCommit" omits all integration-cli tests
integration and integration-cli skipped according to env vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This directory holds scripts called by make.sh in the parent directory.
Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example:
./hack/make.sh binary ubuntu
# Or to run all default bundles:
./hack/make.sh
To add a bundle:
- Create a shell-compatible file here
- Add it to $DEFAULT_BUNDLES in make.sh