unittests: use current version of BOLTS when reading specs.

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>
This commit is contained in:
Rusty Russell 2024-07-17 17:25:55 +09:30 committed by Vincenzo Palazzo
parent 6a98de5830
commit 6bf41f4807
8 changed files with 9 additions and 9 deletions

View file

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

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");