diff --git a/Dockerfile b/Dockerfile index 33e88dce26..62ab2affec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run -e DOCKER_GITCOMMIT=foo --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py +# docker run -e DOCKER_GITCOMMIT=foo --privileged docker hack/make.sh test-unit test-integration test-docker-py # # # Publish a release: # docker run --privileged \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index cabcda28bd..4526a1b257 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py +# docker run --privileged docker hack/make.sh test-unit test-integration test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. diff --git a/Dockerfile.armhf b/Dockerfile.armhf index dd1f536191..b19dbe5d30 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py +# docker run --privileged docker hack/make.sh test-unit test-integration test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index 43b84e4501..940369f967 100644 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py +# docker run --privileged docker hack/make.sh test-unit test-integration test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. diff --git a/Dockerfile.s390x b/Dockerfile.s390x index 35ec683739..63f45d78e6 100644 --- a/Dockerfile.s390x +++ b/Dockerfile.s390x @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py +# docker run --privileged docker hack/make.sh test-unit test-integration test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. diff --git a/Dockerfile.simple b/Dockerfile.simple index b4682d4cbc..f84f3c565c 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -1,7 +1,7 @@ # docker build -t docker:simple -f Dockerfile.simple . # docker run --rm docker:simple hack/make.sh dynbinary # docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit -# docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration-cli +# docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration # This represents the bare minimum required to build and test Docker. diff --git a/Makefile b/Makefile index 4bbf5e2800..85877bdd2e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary dynbinary build cross deb help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration-cli test-unit tgz validate win +.PHONY: all binary dynbinary build cross deb help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration test-unit tgz validate win # set the graph driver as the current graphdriver if not set DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //')) @@ -149,13 +149,12 @@ shell: build ## start a shell inside the build env $(DOCKER_RUN_DOCKER) bash test: build ## run the unit, integration and docker-py tests - $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary cross test-unit test-integration-cli test-docker-py + $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary cross test-unit test-integration test-docker-py test-docker-py: build ## run the docker-py tests $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary test-docker-py -test-integration-cli: build ## (DEPRECATED) use test-integration - $(DOCKER_RUN_DOCKER) hack/make.sh build-integration-test-cli-binary dynbinary test-integration +test-integration-cli: test-integration ## (DEPRECATED) use test-integration test-integration: build ## run the integration tests $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary test-integration diff --git a/hack/README.md b/hack/README.md index 802395d533..9e588db256 100644 --- a/hack/README.md +++ b/hack/README.md @@ -37,14 +37,14 @@ More information is found within `make.ps1` by the author, @jhowardmsft - Referenced via `make test` when running tests on a local machine, or directly referenced when running tests inside a Docker development container. - When running on a local machine, `make test` to run all tests found in -`test`, `test-unit`, `test-integration-cli`, and `test-docker-py` on +`test`, `test-unit`, `test-integration`, and `test-docker-py` on your local machine. The default timeout is set in `make.sh` to 60 minutes (`${TIMEOUT:=60m}`), since it currently takes up to an hour to run all of the tests. - When running inside a Docker development container, `hack/make.sh` does not have a single target that runs all the tests. You need to provide a single command line with multiple targets that performs the same thing. -An example referenced from [Run targets inside a development container](https://docs.docker.com/opensource/project/test-and-docs/#run-targets-inside-a-development-container): `root@5f8630b873fe:/go/src/github.com/moby/moby# hack/make.sh dynbinary binary cross test-unit test-integration-cli test-docker-py` +An example referenced from [Run targets inside a development container](https://docs.docker.com/opensource/project/test-and-docs/#run-targets-inside-a-development-container): `root@5f8630b873fe:/go/src/github.com/moby/moby# hack/make.sh dynbinary binary cross test-unit test-integration test-docker-py` - For more information related to testing outside the scope of this README, refer to [Run tests and test documentation](https://docs.docker.com/opensource/project/test-and-docs/) diff --git a/hack/make.sh b/hack/make.sh index f5bf87fc35..ffcd7abdb3 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -61,7 +61,6 @@ DEFAULT_BUNDLES=( test-unit test-integration - test-integration-cli test-docker-py cross diff --git a/hack/make/.integration-daemon-start b/hack/make/.integration-daemon-start index dafd0533d9..0e8573ede1 100644 --- a/hack/make/.integration-daemon-start +++ b/hack/make/.integration-daemon-start @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# see test-integration-cli for example usage of this script +# see test-integration for example usage of this script base="$ABS_DEST/.." export PATH="$base/binary-daemon:$base/dynbinary-daemon:$PATH" diff --git a/hack/make/build-integration-test-binary b/hack/make/build-integration-test-binary index a842e8cce8..c2c81dfdf7 100644 --- a/hack/make/build-integration-test-binary +++ b/hack/make/build-integration-test-binary @@ -2,7 +2,7 @@ set -e rm -rf "$DEST" -DEST="$ABS_DEST/../test-integration-cli" +DEST="$ABS_DEST/../test-integration" source "$SCRIPTDIR/make/.go-autogen" diff --git a/hack/make/test-integration b/hack/make/test-integration index f5cd1fd63e..d6e5b00060 100755 --- a/hack/make/test-integration +++ b/hack/make/test-integration @@ -1,10 +1,13 @@ #!/usr/bin/env bash set -e +source "${MAKEDIR}/.go-autogen" source hack/make/.integration-test-helpers # subshell so that we can export PATH without breaking other things ( + bundle build-integration-cli-test-binary + bundle .integration-daemon-start bundle .integration-daemon-setup @@ -15,7 +18,7 @@ source hack/make/.integration-test-helpers if [ "$(go env GOOS)" != 'windows' ] then - leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }') + leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration/ { print $1 }') if [ -n "$leftovers" ] then ps aux diff --git a/hack/make/test-integration-cli b/hack/make/test-integration-cli index 61e2f7a7f8..9282b4fda1 100755 --- a/hack/make/test-integration-cli +++ b/hack/make/test-integration-cli @@ -1,29 +1,4 @@ #!/usr/bin/env bash set -e - -source "${MAKEDIR}/.go-autogen" -source hack/make/.integration-test-helpers - -# subshell so that we can export PATH without breaking other things -( - bundle .integration-daemon-start - - bundle .integration-daemon-setup - - bundle_test_integration_cli - - bundle .integration-daemon-stop - - if [ "$(go env GOOS)" != 'windows' ] - then - leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }') - if [ -n "$leftovers" ] - then - ps aux - kill -9 $leftovers 2> /dev/null - echo "!!!! WARNING you have left over shim(s), Cleanup your test !!!!" - exit 1 - fi - fi - -) 2>&1 | tee -a "$DEST/test.log" +echo "WARNING: test-integration-cli is DEREPCATED. Use test-integration." >&2 +exit 1 diff --git a/hack/release.sh b/hack/release.sh index 5d7363044b..04f15be02b 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -57,7 +57,7 @@ if [ "$1" != '--release-regardless-of-test-failure' ]; then RELEASE_BUNDLES=( test-unit "${RELEASE_BUNDLES[@]}" - test-integration-cli + test-integration ) fi diff --git a/project/ARM.md b/project/ARM.md index e61e3b1847..c876231d1e 100644 --- a/project/ARM.md +++ b/project/ARM.md @@ -17,7 +17,7 @@ From the root of the Docker/Docker repo one can use make to execute the followin - make default - make shell - make test-unit -- make test-integration-cli +- make test-integration - make The Makefile does include logic to determine on which OS and architecture the Docker Development Image is built.