From 3b1357c3ab1ddf9f4da87595d39af972677afbd9 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 2 Nov 2018 09:49:32 +0100 Subject: [PATCH] build: apply rpctest tag in itest We need to distinguish an lnd build for the purpose of integration testing from a regular dev build. This makes it possible to adapt parameters to let integration tests run faster (for example: sweeper batch window). --- .gitignore | 2 ++ Makefile | 8 +++++++- lntest/node.go | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d7f19c41..290cf568 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,8 @@ _testmain.go /lnd-debug /lncli /lncli-debug +/lnd-itest +/lncli-itest # Integration test log files output*.log diff --git a/Makefile b/Makefile index 96218891..b0e4ec30 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,11 @@ build: $(GOBUILD) -tags="$(DEV_TAGS)" -o lnd-debug $(LDFLAGS) $(PKG) $(GOBUILD) -tags="$(DEV_TAGS)" -o lncli-debug $(LDFLAGS) $(PKG)/cmd/lncli +build-itest: + @$(call print, "Building itest lnd and lncli.") + $(GOBUILD) -tags="$(ITEST_TAGS)" -o lnd-itest $(LDFLAGS) $(PKG) + $(GOBUILD) -tags="$(ITEST_TAGS)" -o lncli-itest $(LDFLAGS) $(PKG)/cmd/lncli + install: @$(call print, "Installing lnd and lncli.") $(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG) @@ -118,7 +123,7 @@ itest-only: @$(call print, "Running integration tests.") $(ITEST) -itest: btcd build itest-only +itest: btcd build-itest itest-only unit: btcd @$(call print, "Running unit tests.") @@ -181,6 +186,7 @@ rpc: clean: @$(call print, "Cleaning source.$(NC)") $(RM) ./lnd-debug ./lncli-debug + $(RM) ./lnd-itest ./lncli-itest $(RM) -r ./vendor .vendor-new diff --git a/lntest/node.go b/lntest/node.go index 811c3a38..d518dd95 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -281,7 +281,7 @@ func (hn *HarnessNode) start(lndError chan<- error) error { args := hn.cfg.genArgs() args = append(args, fmt.Sprintf("--profile=%d", 9000+hn.NodeID)) - hn.cmd = exec.Command("./lnd-debug", args...) + hn.cmd = exec.Command("./lnd-itest", args...) // Redirect stderr output to buffer var errb bytes.Buffer