mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: add slow_test marker.
And when it's set, and we're SLOW_MACHINE, simply disable valgrind. Since Travis (SLOW_MACHINE=1) only does VALGRIND=1 DEVELOPER=1 tests, and VALGRIND=0 DEVELOPER=0 tests, it was missing tests which needed DEVELOPER and !VALGRIND. Instead, this demotes them to non-valgrind tests for SLOW_MACHINEs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
51aae9cce7
commit
01a82d38f7
@@ -959,7 +959,11 @@ class LightningNode(object):
|
||||
class NodeFactory(object):
|
||||
"""A factory to setup and start `lightningd` daemons.
|
||||
"""
|
||||
def __init__(self, testname, bitcoind, executor, directory, db_provider, node_cls):
|
||||
def __init__(self, request, testname, bitcoind, executor, directory, db_provider, node_cls):
|
||||
if request.node.get_closest_marker("slow_test") and SLOW_MACHINE:
|
||||
self.valgrind = False
|
||||
else:
|
||||
self.valgrind = VALGRIND
|
||||
self.testname = testname
|
||||
self.next_id = 1
|
||||
self.nodes = []
|
||||
@@ -969,7 +973,6 @@ class NodeFactory(object):
|
||||
self.lock = threading.Lock()
|
||||
self.db_provider = db_provider
|
||||
self.node_cls = node_cls
|
||||
self.valgrind = VALGRIND
|
||||
|
||||
def split_options(self, opts):
|
||||
"""Split node options from cli options
|
||||
|
||||
Reference in New Issue
Block a user