blob: 9d8e033285d09bfc2494846b28069c9f1297d24e [file] [log] [blame]
default: all
# Note: super-init-not-called really should be enabled, but we had to
# disable it for now due to gpylint bug b/18440404. Re-enable the warning
# if that bug gets fixed.
GPYLINT=$(shell \
if which gpylint >/dev/null; then \
echo gpylint \
--disable=g-bad-import-order \
--disable=g-unknown-interpreter \
--disable=super-init-not-called; \
else \
echo 'echo "(gpylint-missing)" >&2'; \
fi \
PYTHONPATH:=$(shell /bin/pwd):$(shell /bin/pwd)/../wvtest:$(PYTHONPATH)
@echo "Nothing to do."
# Use a submake here, only because otherwise GNU make (3.81) will not print
# an error about 'test' itself failing if one of the two sub-targets fails.
# Without such output, 'lint' could fail long before test_only fails, and
# the test_only output could scroll off the top of the screen, leaving the
# misleading impression that everything tested successfully.
$(MAKE) test_only lint
test_only: all *
for d in $(filter,$^); do \
echo "Testing $$d"; \
wvtest/ $$d; \
# For maximum parallelism, we could just have a rule that depends on %.lint
# for all interesting files. But gpylint takes a long time to start up, so
# let's try to batch several files together into each instance to minimize
# the runtime. For added fun, gpylint has bugs if you specify files from
# more than one directory at once, so break it out by directory.
lint: \
report.lint \
sample.lint \
%.lint: all
@$(GPYLINT) $*
rm -f *~ .*~ *.pyc