From 656a452914f82e0fa5f19bd0ec8676c31f4ee713 Mon Sep 17 00:00:00 2001 From: Jonathan Harvey-Buschel Date: Fri, 23 Aug 2024 16:49:58 -0400 Subject: [PATCH 1/3] make: separate rebuilding itest litd and itest run --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 84a20ff4cd0499d993580d67096272514bb246d5 Mon Sep 17 00:00:00 2001 From: Jonathan Harvey-Buschel Date: Fri, 23 Aug 2024 16:51:25 -0400 Subject: [PATCH 2/3] chore: add vscode tasks to mirror make itest setup --- .vscode/tasks.json | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .vscode/tasks.json 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 From 80687e0b80c9af842014d12958fbe68481a81bf7 Mon Sep 17 00:00:00 2001 From: Jonathan Harvey-Buschel Date: Fri, 23 Aug 2024 16:52:30 -0400 Subject: [PATCH 3/3] chore: add vscode debug target for specific itest --- .vscode/launch.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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",