diff --git a/.travis.yml b/.travis.yml index be326c1a..63c7229f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,8 +53,9 @@ jobs: - make docs - make go: tip - - stage: Integration Test + - stage: Unit and Integration Tests script: + - make testunit - make integration go: 1.8.x diff --git a/Makefile b/Makefile index aea52086..952c602f 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,8 @@ help: @echo @echo " * 'install' - Install binaries to system locations" @echo " * 'binaries' - Build crio, conmon and crioctl" + @echo " * 'test' - Execute unit and integration tests" + @echo " * 'testunit' - Execute unit tests" @echo " * 'integration' - Execute integration tests" @echo " * 'clean' - Clean artifacts" @echo " * 'lint' - Execute the source code linter" @@ -115,6 +117,9 @@ crioimage: dbuild: crioimage docker run --name=${CRIO_INSTANCE} --privileged ${CRIO_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries +test: crioimage + docker run -e STORAGE_OPTS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make -k testunit localintegration + integration: crioimage docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make localintegration