mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
make+Travis: use EXEC_SUFFIX for Windows, remove explicit goal
To remove the need to have an extra make goal for the Windows itests, we instead add the flag windows=1 that sets the make variable EXEC_SUFFIX to properly add the ".exe" suffix to all executable names.
This commit is contained in:
29
Makefile
29
Makefile
@@ -141,13 +141,8 @@ build:
|
||||
|
||||
build-itest:
|
||||
@$(call print, "Building itest lnd and lncli.")
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lnd-itest $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lncli-itest $(ITEST_LDFLAGS) $(PKG)/cmd/lncli
|
||||
|
||||
build-itest-windows:
|
||||
@$(call print, "Building itest lnd and lncli.")
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lnd-itest.exe $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lncli-itest.exe $(ITEST_LDFLAGS) $(PKG)/cmd/lncli
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lnd-itest$(EXEC_SUFFIX) $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
$(GOBUILD) -tags="$(ITEST_TAGS)" -o lncli-itest$(EXEC_SUFFIX) $(ITEST_LDFLAGS) $(PKG)/cmd/lncli
|
||||
|
||||
install:
|
||||
@$(call print, "Installing lnd and lncli.")
|
||||
@@ -171,33 +166,21 @@ check: unit itest
|
||||
itest-only:
|
||||
@$(call print, "Running integration tests with ${backend} backend.")
|
||||
rm -rf lntest/itest/*.log lntest/itest/.logs-*; date
|
||||
scripts/itest_part.sh 0 1 $(TEST_FLAGS) $(ITEST_FLAGS)
|
||||
EXEC_SUFFIX=$(EXEC_SUFFIX) scripts/itest_part.sh 0 1 $(TEST_FLAGS) $(ITEST_FLAGS)
|
||||
lntest/itest/log_check_errors.sh
|
||||
|
||||
itest: btcd build-itest itest-only
|
||||
|
||||
itest-parallel: btcd
|
||||
@$(call print, "Building lnd binary")
|
||||
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o lntest/itest/lnd-itest $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o lntest/itest/lnd-itest$(EXEC_SUFFIX) $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
|
||||
@$(call print, "Building itest binary for $(backend) backend")
|
||||
CGO_ENABLED=0 $(GOTEST) -v ./lntest/itest -tags="$(DEV_TAGS) $(RPC_TAGS) rpctest $(backend)" -logoutput -goroutinedump -c -o lntest/itest/itest.test
|
||||
CGO_ENABLED=0 $(GOTEST) -v ./lntest/itest -tags="$(DEV_TAGS) $(RPC_TAGS) rpctest $(backend)" -logoutput -goroutinedump -c -o lntest/itest/itest.test$(EXEC_SUFFIX)
|
||||
|
||||
@$(call print, "Running tests")
|
||||
rm -rf lntest/itest/*.log lntest/itest/.logs-*
|
||||
echo "$$(seq 0 $$(expr $(ITEST_PARALLELISM) - 1))" | xargs -P $(ITEST_PARALLELISM) -n 1 -I {} scripts/itest_part.sh {} $(NUM_ITEST_TRANCHES) $(TEST_FLAGS)
|
||||
|
||||
itest-parallel-windows: btcd
|
||||
@$(call print, "Building lnd binary")
|
||||
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o lntest/itest/lnd-itest.exe $(ITEST_LDFLAGS) $(PKG)/cmd/lnd
|
||||
|
||||
@$(call print, "Building itest binary for $(backend) backend")
|
||||
CGO_ENABLED=0 $(GOTEST) -v ./lntest/itest -tags="$(DEV_TAGS) $(RPC_TAGS) rpctest $(backend)" -logoutput -goroutinedump -c -o lntest/itest/itest.test.exe
|
||||
|
||||
@$(call print, "Running tests")
|
||||
EXEC_SUFFIX=".exe" echo "$$(seq 0 $$(expr $(ITEST_PARALLELISM) - 1))" | xargs -P $(ITEST_PARALLELISM) -n 1 -I {} scripts/itest_part.sh {} $(NUM_ITEST_TRANCHES) $(TEST_FLAGS)
|
||||
|
||||
itest-windows: btcd build-itest-windows itest-only
|
||||
EXEC_SUFFIX=$(EXEC_SUFFIX) echo "$$(seq 0 $$(expr $(ITEST_PARALLELISM) - 1))" | xargs -P $(ITEST_PARALLELISM) -n 1 -I {} scripts/itest_part.sh {} $(NUM_ITEST_TRANCHES) $(TEST_FLAGS)
|
||||
|
||||
unit: btcd
|
||||
@$(call print, "Running unit tests.")
|
||||
|
Reference in New Issue
Block a user