Skip to content

Commit

Permalink
pyln: Use pyln-client Makefile for checks
Browse files Browse the repository at this point in the history
Kinda uses an antipattern of `cd`ing into the directory and calling `make`
there, but this keeps the contrib dirs self-contained so we can split them out
eventually.
  • Loading branch information
cdecker authored and rustyrussell committed Sep 27, 2020
1 parent 1d2c2b6 commit 2740f2e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,20 @@ check-spelling:

PYSRC=$(shell git ls-files "*.py" | grep -v /text.py) contrib/pylightning/lightning-pay

check-python:
# Some tests in pyln will need to find lightningd to run, so have a PATH that
# allows it to find that
PYLN_PATH=$(shell pwd)/lightningd:$(PATH)
check-pyln-%: $(BIN_PROGRAMS)
@(cd contrib/$(shell echo $@ | cut -b 7-) && PATH=$(PYLN_PATH) PYTHONPATH=$(PYTHONPATH) $(MAKE) check)

check-python: check-pyln-client
@# E501 line too long (N > 79 characters)
@# E731 do not assign a lambda expression, use a def
@# W503: line break before binary operator
@flake8 --ignore=E501,E731,W503 ${PYSRC}

PYTHONPATH=contrib/pyln-client:$$PYTHONPATH $(PYTEST) contrib/pyln-client/
PYTHONPATH=contrib/pyln-proto:$$PYTHONPATH $(PYTEST) contrib/pyln-proto/
PYTHONPATH=$(PYTHONPATH) $(PYTEST) contrib/pyln-testing/tests/
PYTHONPATH=$(PYTHONPATH) $(PYTEST) contrib/pyln-proto/tests/

check-includes:
@tools/check-includes.sh
Expand Down

0 comments on commit 2740f2e

Please sign in to comment.