Skip to content

Commit 09e24f7

Browse files
committed
Makefile: enhance build-itest target for chantools setup
Update the `build-itest` Makefile target, used as a subcommand during `make itest`, to ensure `chantools` is properly set up for integration tests. Additionally, update `.gitignore` to exclude the `chantools` build directory.
1 parent 777cc5e commit 09e24f7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cmd/tapd/tapd
1313

1414
/itest/lnd-itest
1515
/itest/btcd-itest
16+
/itest/chantools
1617
/itest/regtest/*
1718
/itest/*.log
1819
/itest/.backendlogs/*

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ build:
9292
$(GOBUILD) -tags="$(DEV_TAGS)" -o tapcli-debug $(DEV_GCFLAGS) $(DEV_LDFLAGS) $(PKG)/cmd/tapcli
9393

9494
build-itest:
95+
@if ! command -v chantools > /dev/null; then \
96+
$(call print, "Building itest chantools."); \
97+
rm -rf itest/chantools; \
98+
git clone --depth 1 --branch v0.13.5 https://github.com/lightninglabs/chantools.git itest/chantools; \
99+
cd itest/chantools && make install; \
100+
else \
101+
$(call print, "Chantools is already installed and available in PATH."); \
102+
fi
103+
95104
@$(call print, "Building itest btcd.")
96105
CGO_ENABLED=0 $(GOBUILD) -tags="integration" -o itest/btcd-itest $(BTCD_PKG)
97106

0 commit comments

Comments
 (0)