Skip to content

Commit

Permalink
Makefile: enhance build-itest target for chantools setup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ffranr committed Jan 9, 2025
1 parent 6462a99 commit b212289
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cmd/tapd/tapd

/itest/lnd-itest
/itest/btcd-itest
/itest/chantools
/itest/regtest/*
/itest/*.log
/itest/.backendlogs/*
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ build:
$(GOBUILD) -tags="$(DEV_TAGS)" -o tapcli-debug $(DEV_GCFLAGS) $(DEV_LDFLAGS) $(PKG)/cmd/tapcli

build-itest:
@if ! command -v chantools > /dev/null; then \
$(call print, "Building itest chantools."); \
rm -rf itest/chantools; \
git clone --depth 1 --branch v0.13.5 https://github.com/lightninglabs/chantools.git itest/chantools; \
cd itest/chantools && make install; \
else \
$(call print, "Chantools is already installed and available in PATH."); \
fi

@$(call print, "Building itest btcd.")
CGO_ENABLED=0 $(GOBUILD) -tags="integration" -o itest/btcd-itest $(BTCD_PKG)

Expand Down

0 comments on commit b212289

Please sign in to comment.