Skip to content

Commit bb21c3c

Browse files
gijswijsZZiigguurraatt
authored and
ZZiigguurraatt
committed
chore: preferable setup with test-mode
This commit changes the mode of itest configuration in `launch.json` to test-mode. It also removes the unused flag `btcdexec`. The binary is expected by lnd though, so it still needs to be built.
1 parent f9939de commit bb21c3c

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

.vscode/launch.json

+20-7
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,43 @@
88
"name": "Debug itest",
99
"type": "go",
1010
"request": "launch",
11-
"mode": "exec",
11+
"mode": "test",
1212
"preLaunchTask": "reset before itest",
13-
"program": "itest/itest.test",
13+
"program": "${workspaceFolder}/itest",
14+
"env": {
15+
"CGO_ENABLED": "0",
16+
},
1417
"args": [
1518
"-test.v",
1619
"-test.run=TestLightningTerminal/test_custom_channels",
1720
"-logoutput",
1821
"-logdir=${workspaceFolder}/itest/.logs",
1922
"-litdexec=${workspaceFolder}/itest/litd-itest",
20-
"-btcdexec=${workspaceFolder}/itest/btcd-itest",
21-
]
23+
],
24+
"buildFlags": [
25+
"-ldflags=-X github.com/lightningnetwork/lnd/build.RawTags=chainrpc,walletrpc,signrpc,invoicesrpc,autopilotrpc,watchtowerrpc,twclientrpc -X github.com/lightningnetwork/lnd/build.Commit=lightning-terminal-v0.4.0-alpha -X github.com/lightninglabs/loop.Commit=localbuild -X github.com/lightninglabs/pool.Commit=localbuild -X github.com/lightninglabs/lightning-terminal.Commit=localbuild",
26+
"-tags=dev integration itest lowscrypt litd autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc peersrpc",
27+
],
2228
},
2329
{
2430
"name": "Debug Tests",
2531
"type": "node",
2632
"request": "launch",
2733
"runtimeExecutable": "${workspaceRoot}/app/node_modules/.bin/react-scripts",
28-
"args": ["test", "--runInBand", "--no-cache", "--watchAll=false"],
34+
"args": [
35+
"test",
36+
"--runInBand",
37+
"--no-cache",
38+
"--watchAll=false"
39+
],
2940
"cwd": "${workspaceRoot}/app/",
3041
"protocol": "inspector",
3142
"console": "integratedTerminal",
3243
"internalConsoleOptions": "neverOpen",
33-
"env": { "CI": "true" },
44+
"env": {
45+
"CI": "true"
46+
},
3447
"disableOptimisticBPs": true
3548
}
3649
]
37-
}
50+
}

.vscode/tasks.json

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
{
2-
"version": "2.0.0",
2+
"version": "2.0.0",
33
"tasks": [
44
{
55
"type": "shell",
6-
"label": "build itest all",
7-
"command": "make build-itest; make build-itest-litd",
8-
"presentation": {
9-
"echo": true,
10-
"reveal": "always",
11-
"focus": false,
12-
"panel": "shared",
13-
"clear": false
14-
},
15-
"problemMatcher": []
16-
},
17-
{
18-
"type": "shell",
19-
"label": "build itest litd",
20-
"command": "make build-itest-litd",
6+
"label": "build itest",
7+
"command": "make build-itest",
218
"presentation": {
229
"echo": true,
2310
"reveal": "always",
@@ -46,7 +33,7 @@
4633
{
4734
"label": "reset before itest",
4835
"dependsOn": [
49-
"build itest litd",
36+
"build itest",
5037
"clear itest logs"
5138
],
5239
"presentation": {

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,11 @@ build-itest: app-build
217217
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/btcd-itest -ldflags "$(ITEST_LDFLAGS)" $(BTCD_PKG)
218218
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/lnd-itest -ldflags "$(ITEST_LDFLAGS)" $(LND_PKG)/cmd/lnd
219219

220-
build-itest-litd:
220+
itest-only:
221221
@$(call print, "Building itest binary.")
222222
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/litd-itest -ldflags "$(ITEST_LDFLAGS)" $(PKG)/cmd/litd
223223
CGO_ENABLED=0 $(GOTEST) -v ./itest -tags="$(DEV_TAGS) $(ITEST_TAGS)" -c -o itest/itest.test
224224

225-
itest-only: build-itest-litd
226225
@$(call print, "Running integration tests.")
227226
rm -rf itest/*.log itest/.logs*; date
228227
scripts/itest_part.sh $(ITEST_FLAGS)

0 commit comments

Comments
 (0)