diff --git a/Makefile b/Makefile index d17be84f3898..adbd60098c6a 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/common/test/run-bolt12-offer-decode.c b/common/test/run-bolt12-offer-decode.c index bb7ec3e28199..c88a4afdff40 100644 --- a/common/test/run-bolt12-offer-decode.c +++ b/common/test/run-bolt12-offer-decode.c @@ -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"); diff --git a/common/test/run-bolt12_decode.c b/common/test/run-bolt12_decode.c index 3f68cc3bddb7..0faa8ccef1fb 100644 --- a/common/test/run-bolt12_decode.c +++ b/common/test/run-bolt12_decode.c @@ -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"); diff --git a/common/test/run-bolt12_merkle-json.c b/common/test/run-bolt12_merkle-json.c index bcfc9ee6b0bc..bf6131ec99c5 100644 --- a/common/test/run-bolt12_merkle-json.c +++ b/common/test/run-bolt12_merkle-json.c @@ -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"); diff --git a/common/test/run-bolt12_period.c b/common/test/run-bolt12_period.c index ed3276243b71..a87ecb169841 100644 --- a/common/test/run-bolt12_period.c +++ b/common/test/run-bolt12_period.c @@ -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"); diff --git a/common/test/run-onion-test-vector.c b/common/test/run-onion-test-vector.c index 897b7bba3321..a42cf1e9b802 100644 --- a/common/test/run-onion-test-vector.c +++ b/common/test/run-onion-test-vector.c @@ -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"); diff --git a/common/test/run-route_blinding_onion_test.c b/common/test/run-route_blinding_onion_test.c index 8b963c343e2b..45610fa7c61f 100644 --- a/common/test/run-route_blinding_onion_test.c +++ b/common/test/run-route_blinding_onion_test.c @@ -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"); diff --git a/common/test/run-route_blinding_test.c b/common/test/run-route_blinding_test.c index c28257e7d542..6cc627762ddb 100644 --- a/common/test/run-route_blinding_test.c +++ b/common/test/run-route_blinding_test.c @@ -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");