diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-10-23 17:36:35 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2018-10-23 17:36:37 -0400 |
commit | 9250747092950e02fe18ff875ab7368b2c7aa613 (patch) | |
tree | ab8a3b045d424026b33f5ce1c5bcfca5e689583a /Makefile | |
parent | 28d8d72a82bc195f47ef5ec14c33ec61231d9b38 (diff) | |
download | podman-9250747092950e02fe18ff875ab7368b2c7aa613.tar.gz podman-9250747092950e02fe18ff875ab7368b2c7aa613.tar.bz2 podman-9250747092950e02fe18ff875ab7368b2c7aa613.zip |
Eat our own dogfood
Switch all tests to use podman installed on the system, or Docker if podman
does not exist.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -23,6 +23,7 @@ BUILDTAGS_CROSS ?= containers_image_openpgp containers_image_ostree_stub exclude ifneq (,$(findstring varlink,$(BUILDTAGS))) PODMAN_VARLINK_DEPENDENCIES = cmd/podman/varlink/iopodman.go endif +CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null | echo docker) HAS_PYTHON3 := $(shell command -v python3 2>/dev/null) @@ -141,16 +142,16 @@ clean: $(MAKE) -C contrib/python/pypodman clean libpodimage: - docker build -t ${LIBPOD_IMAGE} . + ${CONTAINER_RUNTIME} build -t ${LIBPOD_IMAGE} . dbuild: libpodimage - docker run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} make all + ${CONTAINER_RUNTIME} run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} make all test: libpodimage - docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make clean all localunit localintegration + ${CONTAINER_RUNTIME} run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make clean all localunit localintegration integration: libpodimage - docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make clean all localintegration + ${CONTAINER_RUNTIME} run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make clean all localintegration integration.fedora: DIST=Fedora sh .papr_prepare.sh @@ -159,10 +160,10 @@ integration.centos: DIST=CentOS sh .papr_prepare.sh shell: libpodimage - docker run --tmpfs -e STORAGE_OPTIONS="--storage-driver=vfs" -e CGROUP_MANAGER=cgroupfs -e TESTFLAGS -e TRAVIS -it --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} sh + ${CONTAINER_RUNTIME} run --tmpfs -e STORAGE_OPTIONS="--storage-driver=vfs" -e CGROUP_MANAGER=cgroupfs -e TESTFLAGS -e TRAVIS -it --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} sh testunit: libpodimage - docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make localunit + ${CONTAINER_RUNTIME} run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} make localunit localunit: varlink_generate $(GO) test -tags "$(BUILDTAGS)" -cover $(PACKAGES) |