Add Makefile target to run unit & integration tests
Also adds unit tests to Travis Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
parent
0fc411d4fe
commit
bbf65dc1bb
2 changed files with 7 additions and 1 deletions
|
@ -53,8 +53,9 @@ jobs:
|
||||||
- make docs
|
- make docs
|
||||||
- make
|
- make
|
||||||
go: tip
|
go: tip
|
||||||
- stage: Integration Test
|
- stage: Unit and Integration Tests
|
||||||
script:
|
script:
|
||||||
|
- make testunit
|
||||||
- make integration
|
- make integration
|
||||||
go: 1.8.x
|
go: 1.8.x
|
||||||
|
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -45,6 +45,8 @@ help:
|
||||||
@echo
|
@echo
|
||||||
@echo " * 'install' - Install binaries to system locations"
|
@echo " * 'install' - Install binaries to system locations"
|
||||||
@echo " * 'binaries' - Build crio, conmon and crioctl"
|
@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 " * 'integration' - Execute integration tests"
|
||||||
@echo " * 'clean' - Clean artifacts"
|
@echo " * 'clean' - Clean artifacts"
|
||||||
@echo " * 'lint' - Execute the source code linter"
|
@echo " * 'lint' - Execute the source code linter"
|
||||||
|
@ -113,6 +115,9 @@ crioimage:
|
||||||
dbuild: crioimage
|
dbuild: crioimage
|
||||||
docker run --name=${CRIO_INSTANCE} --privileged ${CRIO_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries
|
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
|
integration: crioimage
|
||||||
docker run -e STORAGE_OPTS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make localintegration
|
docker run -e STORAGE_OPTS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make localintegration
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue