mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-20 13:54:36 +01:00
pytest: support simple subdaemon debugging.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7b9341e762
commit
312209ad60
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
Adust `-j` and `PYTEST_PAR` accordingly for your hardware.
|
||||
Adjust `-j` and `PYTEST_PAR` accordingly for your hardware.
|
||||
|
||||
There are three kinds of tests:
|
||||
|
||||
|
@ -200,7 +200,9 @@ There are three kinds of 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
|
||||
pull request.
|
||||
|
|
|
@ -703,6 +703,8 @@ class NodeFactory(object):
|
|||
if DEVELOPER:
|
||||
daemon.opts["dev-fail-on-subdaemon-fail"] = None
|
||||
daemon.env["LIGHTNINGD_DEV_MEMLEAK"] = "1"
|
||||
if os.getenv("DEBUG_SUBD"):
|
||||
daemon.opts["dev-debugger"] = os.getenv("DEBUG_SUBD")
|
||||
if VALGRIND:
|
||||
daemon.env["LIGHTNINGD_DEV_NO_BACKTRACE"] = "1"
|
||||
if not may_reconnect:
|
||||
|
|
Loading…
Add table
Reference in a new issue