- add Makefile with test rule - add use of virtualenv to run tests - add requirements.txt - use junit report - skip it on debian/rules Change-Id: I393431317de7dd1b445ae568a14291a370bc22b3changes/56/1356/3
parent
2383cafe85
commit
07545f7964
@ -0,0 +1,27 @@
|
|||||||
|
# do nothing as default
|
||||||
|
all:
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
SHELL = /bin/bash
|
||||||
|
venv: requirements.txt
|
||||||
|
virtualenv --python=python2.7 venv
|
||||||
|
source ./venv/bin/activate && \
|
||||||
|
pip install -r ./requirements.txt >install.log
|
||||||
|
|
||||||
|
test_check: venv tests/test_check.py
|
||||||
|
mkdir -p reports
|
||||||
|
source ./venv/bin/activate && \
|
||||||
|
./tests/test_check.py > reports/$(@).xml
|
||||||
|
|
||||||
|
# run this in parallel!! -j is your friend
|
||||||
|
test: test_check
|
||||||
|
|
||||||
|
# get rid of test files
|
||||||
|
clean:
|
||||||
|
rm -rf install.log
|
||||||
|
|
||||||
|
# also get rid of pip environment
|
||||||
|
dist-clean: clean
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
unittest-xml-reporting
|
||||||
|
pyaml
|
||||||
Loading…
Reference in new issue