From c24573b0d2ee87e7b1c9d2998408dc5f6b6e1c29 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 2 Aug 2019 11:41:09 +0930 Subject: [PATCH] Makefile: set PYTHONPATH to be absolute when running tests. My test machine started failing on dynamic plugin tests, unable to find the lightning module: ModuleNotFoundError: No module named 'lightning' This is because plugins at startup are run from whatever directory you're in, but on refresh are run from the lightning-dir. Signed-off-by: Rusty Russell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6f40500e..b7db3d235 100644 --- a/Makefile +++ b/Makefile @@ -259,7 +259,7 @@ ifeq ($(PYTEST),) exit 1 else # Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line. - PYTHONPATH=contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) + PYTHONPATH=`pwd`/contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) endif # Keep includes in alpha order.