improve test and clean targets in Makefiles
This commit is contained in:
parent
aa48b87c12
commit
7a6ebc851f
13 changed files with 39 additions and 9 deletions
|
|
@ -1,6 +1,8 @@
|
|||
[run]
|
||||
data_file = .coverage2
|
||||
|
||||
omit =
|
||||
setup.py
|
||||
/usr/*
|
||||
tests/*
|
||||
|
||||
|
|
@ -8,3 +10,6 @@ omit =
|
|||
exclude_lines =
|
||||
pragma: no cover
|
||||
no cover: 2.x
|
||||
|
||||
[html]
|
||||
directory = htmlcov/py2
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
[run]
|
||||
data_file = .coverage3
|
||||
|
||||
; extra omissions for py3 for now
|
||||
|
||||
omit =
|
||||
setup.py
|
||||
/usr/*
|
||||
tests/*
|
||||
|
||||
|
|
@ -11,3 +13,6 @@ exclude_lines =
|
|||
pragma: no cover
|
||||
no cover 3.x
|
||||
if six.PY2
|
||||
|
||||
[html]
|
||||
directory = htmlcov/py3
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -10,6 +10,7 @@ util/koji-shadowc
|
|||
#
|
||||
# coverage artifacts
|
||||
.coverage
|
||||
.coverage[23]
|
||||
htmlcov/
|
||||
*,cover
|
||||
#
|
||||
|
|
|
|||
24
Makefile
24
Makefile
|
|
@ -61,29 +61,39 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~ koji*.bz2 koji*.src.rpm
|
||||
rm -rf __pycache__
|
||||
rm -rf devtools/fakehubc devtools/fakewebc devtools/__pycache__
|
||||
rm -rf koji-$(VERSION)
|
||||
for d in $(SUBDIRS); do make -s -C $$d clean; done
|
||||
coverage erase ||:
|
||||
find ./tests -name "__pycache__" -exec rm -rf {} \; ||:
|
||||
find ./tests -name "*.pyc" -exec rm -f {} \;
|
||||
rm -rf docs/source/__pycache__ docs/source/*.pyc
|
||||
coverage2 erase ||:
|
||||
coverage3 erase --rcfile .coveragerc3 ||:
|
||||
rm -rf htmlcov
|
||||
|
||||
git-clean:
|
||||
@git clean -d -q -x
|
||||
|
||||
test:
|
||||
test: test2 test3
|
||||
@echo "All tests are finished for python 2&3"
|
||||
|
||||
test2:
|
||||
coverage2 erase
|
||||
PYTHONPATH=hub/.:plugins/hub/.:plugins/builder/.:plugins/cli/.:cli/.:www/lib coverage2 run \
|
||||
--source . /usr/bin/nosetests
|
||||
coverage2 report
|
||||
coverage2 html
|
||||
@echo Full coverage report at file://$(CURDIR)/htmlcov/index.html
|
||||
@echo Full coverage report at file://${CURDIR}/htmlcov/py2/index.html
|
||||
|
||||
test3:
|
||||
coverage3 erase
|
||||
coverage3 erase --rcfile .coveragerc3
|
||||
PYTHONPATH=hub/.:plugins/hub/.:plugins/builder/.:plugins/cli/.:cli/.:www/lib coverage3 run \
|
||||
--rcfile .coveragerc3 --source . \
|
||||
/usr/bin/nosetests-3
|
||||
coverage3 report --rcfile .coveragerc3
|
||||
coverage3 html --rcfile .coveragerc3
|
||||
@echo Full coverage report at file://$(CURDIR)/htmlcov/index.html
|
||||
coverage report --rcfile .coveragerc3
|
||||
coverage html --rcfile .coveragerc3
|
||||
@echo Full coverage report at file://${CURDIR}/htmlcov/py3/index.html
|
||||
|
||||
test-tarball:
|
||||
@rm -rf .koji-$(VERSION)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~ kojidc
|
||||
rm -rf __pycache__
|
||||
|
||||
|
||||
_install:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~ kojic
|
||||
rm -rf __pycache__
|
||||
for d in $(SUBDIRS); do make -s -C $$d clean; done
|
||||
|
||||
install:
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
rm -rf __pycache__
|
||||
|
||||
install:
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
rm -rf __pycache__
|
||||
|
||||
install:
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
for d in $(SUBDIRS); do make -s -C $$d clean; done
|
||||
rm -rf __pycache__
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)/$(PKGDIR)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ _default:
|
|||
@echo "nothing to make. try make install"
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *.pyo *~
|
||||
find . -name "__pycache__" -exec rm -rf {} \; ||:
|
||||
find . -name "*.pyc" -exec rm -f {} \;
|
||||
|
||||
install:
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
rm -rf __pycache__
|
||||
for b in $(BINFILES); do rm -f $${b}c; done
|
||||
|
||||
_install:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
rm -rf __pycache__
|
||||
for d in $(SUBDIRS); do make -s -C $$d clean; done
|
||||
|
||||
install:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ _default:
|
|||
|
||||
clean:
|
||||
rm -f *.o *.so *.pyc *~
|
||||
rm -rf __pycache__
|
||||
for d in $(SUBDIRS); do make -s -C $$d clean; done
|
||||
|
||||
install:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue