Files
moby/hack/make
Sebastiaan van Stijn 436058cbe4 hack: treat Go sources as text when filtering tests
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>
2026-08-29 19:47:55 +02:00
..
2025-12-17 18:02:37 +01:00
2021-06-01 23:48:32 +00:00
2021-06-01 22:14:06 +00:00
2026-04-25 22:49:57 +09:00
2021-06-01 22:14:06 +00:00
2026-04-25 22:49:57 +09:00
2021-06-01 23:48:32 +00:00
2017-07-17 11:39:33 -04:00
2026-07-14 19:52:42 +02:00
2023-05-29 11:03:48 +02:00

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