From da062df594443a4fe3c16e11a8e8566b5e841dd1 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 23 Feb 2018 23:11:06 +0100 Subject: [PATCH] make: If running on travis allow 3 reruns of failed tests This may mask a few flaky tests, but cuts down on the manual reruns. Signed-off-by: Christian Decker --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e3304f87c..e16e956cc 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,10 @@ PIE_LDFLAGS=-pie endif PYTEST := $(shell command -v pytest 2> /dev/null) +PYTEST_OPTS := -v -x +ifeq ($(TRAVIS),true) +PYTEST_OPTS += --reruns=3 +endif # This is where we add new features as bitcoin adds them. FEATURES := @@ -197,7 +201,7 @@ pytest: $(ALL_PROGRAMS) ifndef PYTEST PYTHONPATH=contrib/pylightning:$$PYTHONPATH DEVELOPER=$(DEVELOPER) python3 tests/test_lightningd.py -f else - PYTHONPATH=contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) $(PYTEST) -vx tests/test_lightningd.py --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT) + PYTHONPATH=contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) $(PYTEST) -vx tests/test_lightningd.py --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT) $(PYTEST_OPTS) endif # Keep includes in alpha order.