Skip to content

Commit 7cfadc1

Browse files
authored
Merge pull request #51 from lightning-signer/2022-03-autoscale-test-runs
Autoscale remote-hsmd test script runs to machine size
2 parents d2dd88f + 2b753ad commit 7cfadc1

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

contrib/remote_hsmd/NOTES.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Setup
55

66
# Add an "upstream" reference and fetch all tags (needed for pyln-{proto,client,testing})
77
git remote add upstream [email protected]:ElementsProject/lightning.git
8-
git fetch --all --recurse-submodules
9-
git fetch --tags
8+
git fetch upstream --tags
109

1110
(cd contrib/remote_hsmd && \
1211
ln -s ../../../validating-lightning-signer/lightning-signer-server/src/server/remotesigner.proto)

contrib/remote_hsmd/scripts/rerun-failed-tests

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ echo "accepts log w/ failures on stdin"
44

55
TESTS=`awk '/^FAILED tests/ {print $2}'`
66

7+
# scale the parallelism to number of processors
8+
NPROC=$(nproc)
9+
TPAR=$((NPROC * 2))
10+
711
PYTHONPATH=\
812
$PWD/contrib/pyln-client:\
913
$PWD/contrib/pyln-testing:\
@@ -16,4 +20,4 @@ REMOTE_SIGNER_CMD=$(pwd)/../validating-lightning-signer/target/debug/server \
1620
REMOTE_SIGNER_ALLOWLIST=$(pwd)/contrib/remote_hsmd/TESTING_ALLOWLIST \
1721
pytest \
1822
$TESTS \
19-
-n=32 --timeout=300 --timeout_method=thread -v
23+
-n=$TPAR --timeout=300 --timeout_method=thread -v

contrib/remote_hsmd/scripts/run-all-tests

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/usr/bin/sh
22

3+
# scale the parallelism to number of processors
4+
JPAR=$(nproc)
5+
TPAR=$((JPAR * 2))
6+
37
SUBDAEMON='hsmd:remote_hsmd' \
48
REMOTE_SIGNER_CMD=$(pwd)/../validating-lightning-signer/target/debug/server \
59
REMOTE_SIGNER_ALLOWLIST=$(pwd)/contrib/remote_hsmd/TESTING_ALLOWLIST \
610
make \
7-
-j16 PYTEST_PAR=32 \
11+
-j$JPAR PYTEST_PAR=$TPAR \
812
DEVELOPER=1 \
913
VALGRIND=0 \
1014
SLOW_MACHINE=0 \

0 commit comments

Comments
 (0)