Skip to content

Commit 5d4234f

Browse files
s373nZShahanaFarooqui
authored andcommitted
doc: Include documentation for test targeting via PYTEST_TESTS.
Also update the table of optional environment variables to set when running the integration tests.
1 parent 98e9eef commit 5d4234f

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

doc/contribute-to-core-lightning/testing.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ There are four kinds of tests:
4343

4444
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, and `DEBUG_LIGHTNINGD` for attaching a debugger to each `lightningd` instance created.
4545

46+
Alternatively, to run a specific test via the `Makefile`, you can specify the test by setting the environment variable `PYTEST_TESTS`:
47+
48+
`PYTEST_TESTS="tests/test_askrene.py::test_layers" make pytest`
49+
4650
- **pylightning tests** - will check contrib pylightning for codestyle and run the tests in `contrib/pylightning/tests` afterwards:
4751

4852
`make check-python`
@@ -52,14 +56,30 @@ Our Github Actions instance (see `.github/workflows/*.yml`) runs all these for e
5256
#### Additional Environment Variables
5357

5458
```text
55-
TEST_CHECK_DBSTMTS=[0|1] - When running blackbox tests, this will
56-
load a plugin that logs all compiled
57-
and expanded database statements.
58-
Note: Only SQLite3.
59-
TEST_DB_PROVIDER=[sqlite3|postgres] - Selects the database to use when running
60-
blackbox tests.
61-
EXPERIMENTAL_DUAL_FUND=[0|1] - Enable dual-funding tests.
62-
EXPERIMENTAL_SPLICING=[0|1] - Enable splicing tests.
59+
COMPAT=[0|1] - Run the blackbox tests in compatability
60+
mode.
61+
EXPERIMENTAL_DUAL_FUND=[0|1] - Enable dual-funding tests.
62+
EXPERIMENTAL_SPLICING=[0|1] - Enable splicing tests.
63+
TEST_CHECK_DBSTMTS=[0|1] - When running blackbox tests, this will
64+
load a plugin that logs all compiled
65+
and expanded database statements.
66+
Note: Only SQLite3.
67+
TEST_DB_PROVIDER=[sqlite3|postgres] - Selects the database to use when running
68+
blackbox tests.
69+
TEST_DEBUG=[0|1] - Enable additional debug logging output
70+
during tests.
71+
TEST_NETWORK=[regtest|liquid-regtest] - Select the test network to use. Default is
72+
to 'regtest'.
73+
TIMEOUT=[0|1] - Override the default timeout value for
74+
API calls.
75+
PYTEST_PAR=[1-n] - Number of processes to use when running
76+
the blackbox the tests in parallel.
77+
PYTEST_TESTS="tests/" - Target a specific set of blackbox tests
78+
when running 'make pytest'. Pass a string
79+
of Pytest test targets.
80+
SLOW_MACHINE=[0|1] - Set sensible defaults for running tests
81+
in resource-constrained environments.
82+
VALGRIND=[0|1] - Run the tests with Valgrind.
6383
```
6484

6585
#### Troubleshooting

0 commit comments

Comments
 (0)