Add make test target and update .gitignore
also submit coverage report to Coveralls.io if environment is configured
This commit is contained in:
parent
fe461f480e
commit
419b79e886
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@
|
|||||||
src/pylorax/version.py*
|
src/pylorax/version.py*
|
||||||
_build/
|
_build/
|
||||||
tests/pylint/.pylint.d/
|
tests/pylint/.pylint.d/
|
||||||
|
__pycache__/
|
||||||
|
.coverage
|
||||||
|
pylint-log
|
||||||
|
10
Makefile
10
Makefile
@ -25,6 +25,14 @@ check:
|
|||||||
@echo "*** Running pylint ***"
|
@echo "*** Running pylint ***"
|
||||||
PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py
|
PYTHONPATH=$(PYTHONPATH):./src/ ./tests/pylint/runpylint.py
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo "*** Running tests ***"
|
||||||
|
PYTHONPATH=$(PYTHONPATH):./src/ $(PYTHON) -m nose -v --with-coverage --cover-erase --cover-branches \
|
||||||
|
--cover-package=pylorax --cover-package=bin --cover-package=sbin --cover-inclusive
|
||||||
|
coverage3 report -m
|
||||||
|
[ -f "/usr/bin/coveralls" ] && [ -n "$(COVERALLS_REPO_TOKEN)" ] && coveralls || echo
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -rf build src/pylorax/version.py
|
-rm -rf build src/pylorax/version.py
|
||||||
|
|
||||||
@ -51,4 +59,4 @@ local:
|
|||||||
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION)
|
@rm -rf /var/tmp/$(PKGNAME)-$(VERSION)
|
||||||
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
|
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
|
||||||
|
|
||||||
ci: check
|
ci: check test
|
||||||
|
Loading…
Reference in New Issue
Block a user