mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
travis: Enable pytest-test-groups to split tests across several runs
Adds two new environment variables TEST_GROUP_COUNT and TEST_GROUP to split the integration tests into groups and run only a selected group. This allows us to increase the TEST_GROUP_COUNT and add a new TEST_GROUP to avoid bumping up against the time limit when running in valgrind. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
1a91786def
commit
ab620c5068
7
Makefile
7
Makefile
@@ -169,6 +169,11 @@ include devtools/Makefile
|
||||
# Git doesn't maintain timestamps, so we only regen if git says we should.
|
||||
CHANGED_FROM_GIT = [ x"`git log $@ | head -n1`" != x"`git log $< | head -n1`" -o x"`git diff $<`" != x"" ]
|
||||
|
||||
ifeq ($(TEST_GROUP_COUNT),)
|
||||
TEST_GROUP=1
|
||||
TEST_GROUP_COUNT=1
|
||||
endif
|
||||
|
||||
check:
|
||||
$(MAKE) pytest
|
||||
|
||||
@@ -176,7 +181,7 @@ pytest: $(ALL_PROGRAMS)
|
||||
ifndef PYTEST
|
||||
PYTHONPATH=contrib/pylightning DEVELOPER=$(DEVELOPER) python3 tests/test_lightningd.py -f
|
||||
else
|
||||
PYTHONPATH=contrib/pylightning TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) $(PYTEST) -vx tests/test_lightningd.py
|
||||
PYTHONPATH=contrib/pylightning TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) $(PYTEST) -vx tests/test_lightningd.py --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT)
|
||||
endif
|
||||
|
||||
# Keep includes in alpha order.
|
||||
|
||||
Reference in New Issue
Block a user