diff --git a/.vscode/launch.json b/.vscode/launch.json index 6e0f47159..94cc25dd2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,22 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Debug itest", + "type": "go", + "request": "launch", + "mode": "exec", + "preLaunchTask": "reset before itest", + "program": "itest/itest.test", + "args": [ + "-test.v", + "-test.run=TestLightningTerminal/test_custom_channels", + "-logoutput", + "-logdir=${workspaceFolder}/itest/.logs", + "-litdexec=${workspaceFolder}/itest/litd-itest", + "-btcdexec=${workspaceFolder}/itest/btcd-itest", + ] + }, { "name": "Debug Tests", "type": "node", diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..fb3493644 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,62 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "label": "build itest all", + "command": "make build-itest; make build-itest-litd", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "clear": false + }, + "problemMatcher": [] + }, + { + "type": "shell", + "label": "build itest litd", + "command": "make build-itest-litd", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "clear": false + }, + "problemMatcher": [] + }, + { + "type": "shell", + "label": "clear itest logs", + "options": { + "cwd": "${workspaceFolder}/itest" + }, + "command": "rm -rf ./*.log .logs*", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "clear": false + }, + "problemMatcher": [] + }, + { + "label": "reset before itest", + "dependsOn": [ + "build itest litd", + "clear itest logs" + ], + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "clear": false + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Makefile b/Makefile index 8bb6cf545..eea37574c 100644 --- a/Makefile +++ b/Makefile @@ -199,11 +199,12 @@ build-itest: app-build CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/btcd-itest -ldflags "$(ITEST_LDFLAGS)" $(BTCD_PKG) CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/lnd-itest -ldflags "$(ITEST_LDFLAGS)" $(LND_PKG)/cmd/lnd -itest-only: +build-itest-litd: @$(call print, "Building itest binary.") CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/litd-itest -ldflags "$(ITEST_LDFLAGS)" $(PKG)/cmd/litd CGO_ENABLED=0 $(GOTEST) -v ./itest -tags="$(DEV_TAGS) $(ITEST_TAGS)" -c -o itest/itest.test +itest-only: build-itest-litd @$(call print, "Running integration tests.") rm -rf itest/*.log itest/.logs*; date scripts/itest_part.sh $(ITEST_FLAGS)