mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pytest: support simple subdaemon debugging.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
7b9341e762
commit
312209ad60
@@ -174,7 +174,7 @@ A modern desktop can build and run through all the tests in a couple of minutes
|
|||||||
|
|
||||||
make -j12 check PYTEST_PAR=24 DEVELOPER=1 VALGRIND=0
|
make -j12 check PYTEST_PAR=24 DEVELOPER=1 VALGRIND=0
|
||||||
|
|
||||||
Adust `-j` and `PYTEST_PAR` accordingly for your hardware.
|
Adjust `-j` and `PYTEST_PAR` accordingly for your hardware.
|
||||||
|
|
||||||
There are three kinds of tests:
|
There are three kinds of tests:
|
||||||
|
|
||||||
@@ -200,7 +200,9 @@ There are three kinds of tests:
|
|||||||
|
|
||||||
`PYTHONPATH=contrib/pylightning py.test -v tests/`.
|
`PYTHONPATH=contrib/pylightning py.test -v tests/`.
|
||||||
|
|
||||||
You can also append `-k TESTNAME` to run a single test.
|
You can also append `-k TESTNAME` to run a single test. Environment variables
|
||||||
|
`DEBUG_SUBD=<subdaemon>` and `TIMEOUT=<seconds>` can be useful for debugging
|
||||||
|
subdaemons on individual tests.
|
||||||
|
|
||||||
Our Travis CI instance (see `.travis.yml`) runs all these for each
|
Our Travis CI instance (see `.travis.yml`) runs all these for each
|
||||||
pull request.
|
pull request.
|
||||||
|
|||||||
@@ -703,6 +703,8 @@ class NodeFactory(object):
|
|||||||
if DEVELOPER:
|
if DEVELOPER:
|
||||||
daemon.opts["dev-fail-on-subdaemon-fail"] = None
|
daemon.opts["dev-fail-on-subdaemon-fail"] = None
|
||||||
daemon.env["LIGHTNINGD_DEV_MEMLEAK"] = "1"
|
daemon.env["LIGHTNINGD_DEV_MEMLEAK"] = "1"
|
||||||
|
if os.getenv("DEBUG_SUBD"):
|
||||||
|
daemon.opts["dev-debugger"] = os.getenv("DEBUG_SUBD")
|
||||||
if VALGRIND:
|
if VALGRIND:
|
||||||
daemon.env["LIGHTNINGD_DEV_NO_BACKTRACE"] = "1"
|
daemon.env["LIGHTNINGD_DEV_NO_BACKTRACE"] = "1"
|
||||||
if not may_reconnect:
|
if not may_reconnect:
|
||||||
|
|||||||
Reference in New Issue
Block a user