Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefile to actually run all tests on all platforms #2

Merged
merged 1 commit into from
Aug 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ DOCKER_RUN_TEST := docker run -v $(PWD):/mnt:ro
DOCKER_DEB_TEST := sh -euxc ' \
apt-get update \
&& apt-get install -y --no-install-recommends procps \
&& (which timeout || apt-get install -y --no-install-recommends timeout) \
&& dpkg -i /mnt/dist/*.deb \
&& cd /mnt \
&& ./test \
'
DOCKER_PYTHON_TEST := sh -uexc ' \
apt-get update \
&& apt-get install -y --no-install-recommends python-pip build-essential procps \
&& pip install -vv /mnt \
&& cd /mnt \
&& (which timeout || apt-get install -y --no-install-recommends timeout) \
&& tmp=$$(mktemp -d) \
&& cp -r /mnt/* "$$tmp" \
&& cd "$$tmp" \
&& python setup.py clean \
&& python setup.py sdist \
&& pip install -vv dist/*.tar.gz \
&& ./test \
'

Expand Down Expand Up @@ -62,9 +68,9 @@ _itest-%: _itest_deb-% _itest_python-%
@true

_itest_python-%:
$(eval DOCKER_IMG := $(shell echo $@ | cut -d- -f2 | sed 's/-/:/'))
$(eval DOCKER_IMG := $(shell echo $@ | cut -d- -f2- | sed 's/-/:/'))
$(DOCKER_RUN_TEST) $(DOCKER_IMG) $(DOCKER_PYTHON_TEST)

_itest_deb-%:
$(eval DOCKER_IMG := $(shell echo $@ | cut -d- -f2 | sed 's/-/:/'))
_itest_deb-%: builddeb-docker
$(eval DOCKER_IMG := $(shell echo $@ | cut -d- -f2- | sed 's/-/:/'))
$(DOCKER_RUN_TEST) $(DOCKER_IMG) $(DOCKER_DEB_TEST)