Skip to content

Commit 9501588

Browse files
committed
run integration tests as part of the build
1 parent 5744424 commit 9501588

File tree

9 files changed

+18
-7
lines changed

9 files changed

+18
-7
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ tmp
88
state
99
build
1010
dist
11-
assets
1211
Godeps/_workspace/pkg
1312
tests/integration/.venv*
1413
tests/integration/.tox
14+
*/*/*/*.pyc
15+
*/*/*/__pycache__

.dockerignore.docker

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ gopath
77
tmp
88
state
99
build
10-
assets
1110
Godeps/_workspace/pkg
11+
tests/integration/.venv*
12+
tests/integration/.tox
13+
*/*/*/*.pyc
14+
*/*/*/__pycache__

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
/tests/integration/MANIFEST
1111
/tests/integration/.venv*
1212
/tests/integration/.tox
13+
*.pyc
14+
__pychache__

Dockerfile.build-base

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ FROM debian:jessie
22
RUN apt-get update && \
33
apt-get -y dist-upgrade && \
44
apt-get -y install locales sudo vim less curl wget git rsync build-essential syslinux isolinux xorriso \
5-
libblkid-dev libmount-dev libselinux1-dev
5+
libblkid-dev libmount-dev libselinux1-dev genisoimage qemu-kvm python-pip
6+
RUN ln -s /usr/bin/genisoimage /usr/bin/mkisofs
67
RUN locale-gen en_US.UTF-8
78
RUN curl -sSL https://get.docker.com/ | sh
89

@@ -11,6 +12,8 @@ RUN curl -sSL https://get.docker.com/ | sh
1112
#ENV LC_ALL en_US.UTF-8
1213
#ENV TERM linux
1314

15+
RUN pip install tox
16+
1417
ENV GOLANG_VERSION 1.4.2
1518
RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz | tar -v -C /usr/src -xz
1619
RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1

Makefile.docker

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ build-all: \
6060
$(DIST)/artifacts/rancheros.iso \
6161
$(DIST)/artifacts/iso-checksums.txt
6262

63+
integration-tests:
64+
cd tests/integration && tox
6365

64-
.PHONY: build-all installer version bin/rancheros
66+
.PHONY: build-all installer version bin/rancheros integration-tests

assets/empty-hd.img.gz

-178 KB
Binary file not shown.

scripts/ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ fi
99

1010
docker build -t ros-build-base -f Dockerfile.build-base .
1111
docker build -t ros-build -f Dockerfile.build .
12-
./scripts/docker-run.sh make -f Makefile.docker build-all
12+
./scripts/docker-run.sh make -f Makefile.docker build-all integration-tests

scripts/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ if [ -n "$BIND_DIR" ]; then
1010
fi
1111

1212
docker rm -fv ros-build >/dev/null 2>&1 || true
13-
exec docker run -i -v /var/run/docker.sock:/var/run/docker.sock $DOCKER_ARGS --name=ros-build ros-build "$@"
13+
exec docker run --privileged -i -v /var/run/docker.sock:/var/run/docker.sock $DOCKER_ARGS --name=ros-build ros-build "$@"

tests/integration/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ skipsdist=True
44

55
[testenv]
66
deps=-rrequirements.txt
7-
commands=py.test --durations=20 rancherostest {posargs}
7+
commands=py.test -s --durations=20 rancherostest {posargs}
88

99
[testenv:flake8]
1010
deps=flake8

0 commit comments

Comments
 (0)