Change in vdsm[master]: make: Run fast checks before slow ones
nsoffer at redhat.com
nsoffer at redhat.com
Fri Sep 5 15:21:38 UTC 2014
Nir Soffer has uploaded a new change for review.
Change subject: make: Run fast checks before slow ones
......................................................................
make: Run fast checks before slow ones
Previously the slow tests where run before the fast pyflakes and pep8
checks, so developer discover unused arguments or whitespace issues only
after 1-2 minutes instead of few seconds.
Now make check runs the fast checks before the slow ones, saving
developer time.
This is implemented by extracting the unrelated checks from check-local
into separate phony targets. This is useful when debugging specific
issues or when creating automated jobs that run specific checks.
Change-Id: Ib3eb8060c5caacddb1c94046ec14daec88c00817
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M Makefile.am
1 file changed, 26 insertions(+), 15 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/32532/1
diff --git a/Makefile.am b/Makefile.am
index a6c1282..8250888 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -80,21 +80,9 @@
$(NULL)
-SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \
- 'lv' from line .*"
-
-check-local:
- python -c 'import pyflakes; print("pyflakes-%s" % pyflakes.__version__)'
- find . -path './.git' -prune -type f -o \
- -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \
- grep -w -v $(SKIP_PYFLAKES_ERR) | \
- while read LINE; do echo "$$LINE"; false; done
- $(PEP8) --version
- for x in $(PEP8_BLACKLIST); do \
- exclude="$${exclude},$${x}" ; \
- done ; \
- $(PEP8) --exclude="$${exclude}" --filename '*.py,*.py.in' .
- $(PEP8) $(PEP8_WHITELIST)
+.PHONY: gitignore
+gitignore:
+ @echo "Checking that .in files are ignored..."
@if test -f .gitignore; then \
for i in `git ls-files \*.in`; do \
if ! grep -q -x $${i%%.in} .gitignore; then \
@@ -102,6 +90,29 @@
done; \
fi;
+SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \
+ 'lv' from line .*"
+
+.PHONY: pyflakes
+pyflakes:
+ python -c 'import pyflakes; print("pyflakes-%s" % pyflakes.__version__)'
+ find . -path './.git' -prune -type f -o \
+ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \
+ grep -w -v $(SKIP_PYFLAKES_ERR) | \
+ while read LINE; do echo "$$LINE"; false; done
+
+.PHONY: pep8
+pep8:
+ $(PEP8) --version
+ for x in $(PEP8_BLACKLIST); do \
+ exclude="$${exclude},$${x}" ; \
+ done ; \
+ $(PEP8) --exclude="$${exclude}" --filename '*.py,*.py.in' .
+ $(PEP8) $(PEP8_WHITELIST)
+
+# Note: dependencies ordered by time needed to run them
+check-recursive: gitignore pyflakes pep8
+
all-local: \
vdsm.spec
--
To view, visit http://gerrit.ovirt.org/32532
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3eb8060c5caacddb1c94046ec14daec88c00817
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list