Browse Source

pytest: support simple subdaemon debugging.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
312209ad60
  1. 6
      doc/HACKING.md
  2. 2
      tests/utils.py

6
doc/HACKING.md

@ -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.

2
tests/utils.py

@ -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…
Cancel
Save