1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make
Sebastiaan van Stijn e7805653b8
Fix TEST_FILTER to work for both "integration" and "integration-cli"
The TEST_FILTER variable allows running a single integration or integration-cli
test. However, it failed to work properly for integration-cli tests.

Before:
-----------

    # Filtering "integration" tests works:
    make TEST_FILTER=TestInspectCpusetInConfigPre120 test-integration
    ...
    DONE 1 tests in 18.331s

    # But running a single test in "integration-cli" did not:

    make TEST_FILTER=TestSwarmNetworkCreateIssue27866 test-integration
    ...
    DONE 0 tests in 17.314s

Trying to manually add the `/` prefix, didn't work either, because that made the
"grep" fail to find which test-suites to run/skip:

    make TEST_FILTER=/TestSwarmNetworkCreateIssue27866 test-integration
    ---> Making bundle: test-integration (in bundles/test-integration)
    make: *** [test-integration] Error 1

After:
-----------

    make TEST_FILTER=TestInspectCpusetInConfigPre120 test-integration
    ...
    DONE 1 tests in 18.331s

    make TEST_FILTER=TestSwarmNetworkCreateIssue27866 test-integration
    ...
    DONE 12 tests in 26.527s

Note that the `12` tests is still a bit misleading, because every _suite_ is
started (which is counted as a test), but no tests are run. This is still
something that could be improved on.

This patch also makes a small modification to the code that's setting
`integration_api_dirs`, and no longer runs `go list` if not needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-21 14:03:58 +02:00
..
.resources-windows hack/make: remove autogen resources for Docker CLI 2019-09-11 15:16:07 +02:00
.binary
.binary-setup
.detect-daemon-osarch
.ensure-emptyfs
.go-autogen hack/make: remove autogen resources for Docker CLI 2019-09-11 15:16:07 +02:00
.go-autogen.ps1 hack/make: remove autogen resources for Docker CLI 2019-09-11 15:16:07 +02:00
.integration-daemon-setup
.integration-daemon-start hack: fix mixed tabs/spaces for indentation 2019-08-02 15:58:33 +02:00
.integration-daemon-stop hack/make: don't attempt to unmount non-existing daemon root-dir 2019-10-11 00:34:53 +02:00
.integration-test-helpers Fix TEST_FILTER to work for both "integration" and "integration-cli" 2019-10-21 14:03:58 +02:00
binary
binary-daemon hack/make/binary-daemon: fix some linting issues 2019-08-31 12:12:25 +02:00
build-integration-test-binary
containerutility
cross
cross-platform-dependent
dynbinary hack: fix mixed tabs/spaces for indentation 2019-08-02 15:58:33 +02:00
dynbinary-daemon
install-binary
README.md
run
test-docker-py bump docker-py to 4.1.0 2019-10-03 16:51:03 +02:00
test-integration integration: simplify parallel run destination 2019-09-11 17:18:38 +02:00
test-integration-cli
test-integration-flaky Improve integration test detecetor 2019-08-07 08:43:43 -07:00
test-integration-shell

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