Add Makefile for running tests in Docker

It assumes you've got Docker running on /var/run/docker.sock, but
that should be the case on both Linux and in Boot2Docker.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2014-10-16 17:53:41 +01:00
parent 695a894a53
commit 4d0416ac91
1 changed files with 15 additions and 0 deletions

15
Makefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: all build test integration-test unit-test
all: test
build:
docker build -t docker-py .
test: unit-test integration-test
unit-test: build
docker run docker-py python tests/test.py
integration-test: build
docker run -v /var/run/docker.sock:/var/run/docker.sock docker-py python tests/integration_test.py