Skip to content

Commit

Permalink
unittests: use current version of BOLTS when reading specs.
Browse files Browse the repository at this point in the history
We check out the master bolts branch, and that recently changed test vectors
causing our CI to change.  We should test them against our current BOLTVERSION,
which is in .tmp.lightningrfc/

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and vincenzopalazzo committed Jul 17, 2024
1 parent 6a98de5 commit 6bf41f4
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@ $(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) lib
update-mocks/%: % $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES)
@MAKE=$(MAKE) tools/update-mocks.sh "$*" $(SUPPRESS_OUTPUT)

unittest/%: %
$(VG) $(VG_TEST_ARGS) $* > /dev/null
unittest/%: % bolt-precheck
BOLTDIR=$(LOCAL_BOLTDIR) $(VG) $(VG_TEST_ARGS) $* > /dev/null

# Installation directories
exec_prefix = $(PREFIX)
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-bolt12-offer-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt12/offers-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-bolt12_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt12/format-string-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-bolt12_merkle-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt12/merkle-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-bolt12_period.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt12/offer-period-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-onion-test-vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt04/onion-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-route_blinding_onion_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt04/blinded-payment-onion-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down
2 changes: 1 addition & 1 deletion common/test/run-route_blinding_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int main(int argc, char *argv[])
char *dir = getenv("BOLTDIR");
json = grab_file(tmpctx,
path_join(tmpctx,
dir ? dir : "../bolts",
dir ? dir : ".tmp.lightningrfc",
"bolt04/route-blinding-test.json"));
if (!json) {
printf("test file not found, skipping\n");
Expand Down

0 comments on commit 6bf41f4

Please sign in to comment.