diff options
author | Tim Bielawa <timbielawa@gmail.com> | 2016-12-09 10:55:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 10:55:25 -0800 |
commit | 68bd0d9d8318bedd36c2ff45b70a6db0329248c6 (patch) | |
tree | 6a2370170bed3fb4e83d1ad64bad07722d48c039 /utils | |
parent | e138b67d12eb0eb1ccb5c9ed7c807b688c58527c (diff) | |
parent | b66a5a667d89f73a9bccdeb0822a85c131340246 (diff) | |
download | openshift-68bd0d9d8318bedd36c2ff45b70a6db0329248c6.tar.gz openshift-68bd0d9d8318bedd36c2ff45b70a6db0329248c6.tar.bz2 openshift-68bd0d9d8318bedd36c2ff45b70a6db0329248c6.tar.xz openshift-68bd0d9d8318bedd36c2ff45b70a6db0329248c6.zip |
Merge pull request #2955 from tbielawa/fix-pooched-ci
Fixes to 'make ci'
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 37 | ||||
-rw-r--r-- | utils/setup.cfg | 1 |
2 files changed, 20 insertions, 18 deletions
diff --git a/utils/Makefile b/utils/Makefile index 49c61e115..ad6735cb5 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -22,6 +22,7 @@ NAME := oo-install +VENV := $(NAME)env TESTPACKAGE := oo-install SHORTNAME := ooinstall @@ -39,7 +40,7 @@ clean: @find . -type f -regex ".*\.py[co]$$" -delete @find . -type f \( -name "*~" -or -name "#*" \) -delete @rm -fR build dist rpm-build MANIFEST htmlcov .coverage cover ooinstall.egg-info oo-install - @rm -fR $(NAME)env + @rm -fR $(VENV) # To force a rebuild of the docs run 'touch' on any *.in file under @@ -62,45 +63,45 @@ viewcover: # Conditional virtualenv building strategy taken from this great post # by Marcel Hellkamp: # http://blog.bottlepy.org/2012/07/16/virtualenv-and-makefiles.html -venv: oo-installenv/bin/activate -oo-installenv/bin/activate: test-requirements.txt +$(VENV): $(VENV)/bin/activate +$(VENV)/bin/activate: test-requirements.txt @echo "#############################################" @echo "# Creating a virtualenv" @echo "#############################################" - test -d venv || virtualenv $(NAME)env - . $(NAME)env/bin/activate && pip install setuptools==17.1.1 - . $(NAME)env/bin/activate && pip install -r test-requirements.txt - touch $(NAME)env/bin/activate + test -d $(VENV) || virtualenv $(VENV) + . $(VENV)/bin/activate && pip install setuptools==17.1.1 + . $(VENV)/bin/activate && pip install -r test-requirements.txt + touch $(VENV)/bin/activate # If there are any special things to install do it here -# . $(NAME)env/bin/activate && INSTALL STUFF +# . $(VENV)/bin/activate && INSTALL STUFF -ci-unittests: +ci-unittests: $(VENV) @echo "#############################################" @echo "# Running Unit Tests in virtualenv" @echo "#############################################" - . $(NAME)env/bin/activate && python setup.py nosetests --cover-erase + . $(VENV)/bin/activate && python setup.py nosetests @echo "VIEW CODE COVERAGE REPORT WITH 'xdg-open cover/index.html' or run 'make viewcover'" -ci-pylint: +ci-pylint: $(VENV) @echo "#############################################" @echo "# Running PyLint Tests in virtualenv" @echo "#############################################" - . $(NAME)env/bin/activate && python -m pylint --rcfile ../git/.pylintrc $(shell find ../ -name $(NAME)env -prune -o -name test -prune -o -name "*.py" -print) 2>&1 | grep -E -v '(locally-disabled|file-ignored)' + . $(VENV)/bin/activate && python -m pylint --rcfile ../git/.pylintrc $(shell find ../ -name $(VENV) -prune -o -name ooinstall.egg-info -prune -o -name test -prune -o -name "*.py" -print) -ci-list-deps: +ci-list-deps: $(VENV) @echo "#############################################" @echo "# Listing all pip deps" @echo "#############################################" - . $(NAME)env/bin/activate && pip freeze + . $(VENV)/bin/activate && pip freeze -ci-flake8: +ci-flake8: $(VENV) @echo "#############################################" @echo "# Running Flake8 Compliance Tests in virtualenv" @echo "#############################################" - . $(NAME)env/bin/activate && flake8 --config=setup.cfg ../ --exclude="utils,../inventory" - . $(NAME)env/bin/activate && python setup.py flake8 + . $(VENV)/bin/activate && flake8 --config=setup.cfg ../ --exclude="utils,../inventory" + . $(VENV)/bin/activate && python setup.py flake8 -ci: venv ci-list-deps ci-unittests ci-flake8 ci-pylint +ci: ci-list-deps ci-unittests ci-flake8 ci-pylint @echo @echo "##################################################################################" @echo "VIEW CODE COVERAGE REPORT WITH 'xdg-open cover/index.html' or run 'make viewcover'" diff --git a/utils/setup.cfg b/utils/setup.cfg index 18b4e3057..ee3288fc5 100644 --- a/utils/setup.cfg +++ b/utils/setup.cfg @@ -11,6 +11,7 @@ with-coverage=1 cover-html=1 cover-inclusive=1 cover-min-percentage=70 +cover-erase=1 detailed-errors=1 cover-branches=1 |