diff --git a/.dockerignore b/.dockerignore index b1d8c320..4d50ab09 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,7 +8,8 @@ tmp state build dist -assets Godeps/_workspace/pkg tests/integration/.venv* tests/integration/.tox +*/*/*/*.pyc +*/*/*/__pycache__ diff --git a/.dockerignore.docker b/.dockerignore.docker index b36c0d26..0b3eb86d 100644 --- a/.dockerignore.docker +++ b/.dockerignore.docker @@ -7,5 +7,8 @@ gopath tmp state build -assets Godeps/_workspace/pkg +tests/integration/.venv* +tests/integration/.tox +*/*/*/*.pyc +*/*/*/__pycache__ diff --git a/.gitignore b/.gitignore index 342b3516..38ff8a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ /tests/integration/MANIFEST /tests/integration/.venv* /tests/integration/.tox +*.pyc +__pychache__ diff --git a/Dockerfile.build-base b/Dockerfile.build-base index 3355c155..50c7e335 100644 --- a/Dockerfile.build-base +++ b/Dockerfile.build-base @@ -2,7 +2,8 @@ FROM debian:jessie RUN apt-get update && \ apt-get -y dist-upgrade && \ apt-get -y install locales sudo vim less curl wget git rsync build-essential syslinux isolinux xorriso \ - libblkid-dev libmount-dev libselinux1-dev + libblkid-dev libmount-dev libselinux1-dev genisoimage qemu-kvm python-pip +RUN ln -s /usr/bin/genisoimage /usr/bin/mkisofs RUN locale-gen en_US.UTF-8 RUN curl -sSL https://get.docker.com/ | sh @@ -11,6 +12,8 @@ RUN curl -sSL https://get.docker.com/ | sh #ENV LC_ALL en_US.UTF-8 #ENV TERM linux +RUN pip install tox + ENV GOLANG_VERSION 1.4.2 RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz | tar -v -C /usr/src -xz RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1 diff --git a/Makefile.docker b/Makefile.docker index 761afc39..b0ff821a 100644 --- a/Makefile.docker +++ b/Makefile.docker @@ -60,5 +60,7 @@ build-all: \ $(DIST)/artifacts/rancheros.iso \ $(DIST)/artifacts/iso-checksums.txt +integration-tests: + cd tests/integration && tox -.PHONY: build-all installer version bin/rancheros +.PHONY: build-all installer version bin/rancheros integration-tests diff --git a/assets/empty-hd.img.gz b/assets/empty-hd.img.gz deleted file mode 100644 index 7ccbceb1..00000000 Binary files a/assets/empty-hd.img.gz and /dev/null differ diff --git a/scripts/ci b/scripts/ci index fb50b2cb..0a2d2382 100755 --- a/scripts/ci +++ b/scripts/ci @@ -9,4 +9,4 @@ fi docker build -t ros-build-base -f Dockerfile.build-base . docker build -t ros-build -f Dockerfile.build . -./scripts/docker-run.sh make -f Makefile.docker build-all +./scripts/docker-run.sh make -f Makefile.docker build-all integration-tests diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index c3bf3b8d..5a4c56d3 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -10,4 +10,4 @@ if [ -n "$BIND_DIR" ]; then fi docker rm -fv ros-build >/dev/null 2>&1 || true -exec docker run -i -v /var/run/docker.sock:/var/run/docker.sock $DOCKER_ARGS --name=ros-build ros-build "$@" +exec docker run --privileged -i -v /var/run/docker.sock:/var/run/docker.sock $DOCKER_ARGS --name=ros-build ros-build "$@" diff --git a/tests/integration/tox.ini b/tests/integration/tox.ini index ace164fb..28f44931 100644 --- a/tests/integration/tox.ini +++ b/tests/integration/tox.ini @@ -4,7 +4,7 @@ skipsdist=True [testenv] deps=-rrequirements.txt -commands=py.test --durations=20 rancherostest {posargs} +commands=py.test -s --durations=20 rancherostest {posargs} [testenv:flake8] deps=flake8