From 28a2782db2f5fd880a71169e71c8ddc0b7049269 Mon Sep 17 00:00:00 2001 From: neumattock <152253273+newmattock@users.noreply.github.com> Date: Mon, 25 May 2026 15:50:01 -0700 Subject: [PATCH] test: initialize submodules before local suite --- README.md | 10 +++++++++- test.sh | 11 +++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e867eee5..37fb4ec8 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,15 @@ Most of the functions that we have re-exported expected `*chaincfg.Params` as an 1. Install Docker 2. Install Docker Compose 3. Run Docker -4. Run `./test.sh` +4. Clone with submodules, or initialize them in an existing checkout: + +```sh +git submodule update --init --recursive +``` + +5. Run `./test.sh` + +The test script also initializes submodules when it is run inside a Git checkout. Example output: diff --git a/test.sh b/test.sh index e0b03f1e..ba35b5b7 100755 --- a/test.sh +++ b/test.sh @@ -1,7 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + git submodule update --init --recursive +fi + source ./infra/.env docker-compose -f ./infra/docker-compose.yaml up --build -d +trap 'docker-compose -f ./infra/docker-compose.yaml down' EXIT echo "Waiting for multichain to boot..." sleep 30 go test -v ./... -docker-compose -f ./infra/docker-compose.yaml down -echo "Done!" \ No newline at end of file +echo "Done!"