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).
This commit is contained in:
Joost Jager 2018-11-02 09:49:32 +01:00
parent 91f3df07e4
commit 3b1357c3ab
No known key found for this signature in database
GPG Key ID: AE6B0D042C8E38D9
3 changed files with 10 additions and 2 deletions

2
.gitignore vendored
View File

@ -28,6 +28,8 @@ _testmain.go
/lnd-debug
/lncli
/lncli-debug
/lnd-itest
/lncli-itest
# Integration test log files
output*.log

View File

@ -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

View File

@ -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