From eaa72edbd6faea2d429f4afd4eef6215b1495f44 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 13 Nov 2019 11:03:42 +1030 Subject: [PATCH] pytest: fix `make pytest` Travis adds the correct PYTHONPATH, but "make check" doesn't. Signed-off-by: Rusty Russell --- .travis/build.sh | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/build.sh b/.travis/build.sh index e5a477f3d..dbbdafa78 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -10,7 +10,7 @@ export SOURCE_CHECK_ONLY=${SOURCE_CHECK_ONLY:-"false"} export COMPAT=${COMPAT:-1} export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH" export PYTEST_PAR=2 -export PYTHONPATH=$PWD/contrib/pylightning:$PYTHONPATH + # If we're not in developer mode, tests spend a lot of time waiting for gossip! # But if we're under valgrind, we can run out of memory! if [ "$DEVELOPER" = 0 ] && [ "$VALGRIND" = 0 ]; then diff --git a/Makefile b/Makefile index 3a799af7f..1d021e5be 100644 --- a/Makefile +++ b/Makefile @@ -263,7 +263,7 @@ ifeq ($(PYTEST),) exit 1 else # Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line. - PYTHONPATH=`pwd`/contrib/pyln-client:`pwd`/contrib/pyln-testing:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) + PYTHONPATH=`pwd`/contrib/pyln-client:`pwd`/contrib/pyln-testing:`pwd`/contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) endif # Keep includes in alpha order.