Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add vscode config to support itest debugging #826

Draft
wants to merge 3 commits into
base: 0-19-staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
62 changes: 62 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -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": []
}
]
}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading