Skip to content

Commit 82eb34b

Browse files
joaopsazevedoabdellah257
authored andcommitted
Reorganize VSCode Tests
Reorganize testsuites into two: general and gnattest. Create a workspace directory for each testsuite. Generate an output xml for each testsuite. Catch any errors running a testsuite but continue running the remaining ones.
1 parent a1de5ad commit 82eb34b

File tree

89 files changed

+111
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+111
-359
lines changed

.vscode/launch.json

Lines changed: 25 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
"cwd": "${workspaceRoot}",
1212
"valuesFormatting": "parseText"
1313
},
14+
{
15+
"type": "gdb",
16+
"request": "launch",
17+
"name": "Launch Program",
18+
"target": ".obj/server/ada_language_server",
19+
"cwd": "${workspaceRoot}",
20+
"valuesFormatting": "parseText"
21+
},
1422
{
1523
"name": "Launch Extension",
1624
"type": "extensionHost",
@@ -47,7 +55,15 @@
4755
}
4856
},
4957
{
50-
"name": "Highlighting Tests (Update tests ref)",
58+
"name": "Launch Extension Testsuite",
59+
"type": "node",
60+
"request": "launch",
61+
"cwd": "${workspaceFolder}/integration/vscode/ada/",
62+
"runtimeExecutable": "npm",
63+
"runtimeArgs": ["run-script", "test"]
64+
},
65+
{
66+
"name": "General Testsuite",
5167
"type": "extensionHost",
5268
"request": "launch",
5369
"runtimeExecutable": "${execPath}",
@@ -57,13 +73,14 @@
5773
],
5874
"args": [
5975
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
60-
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/general/highlighting/index",
61-
"${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
76+
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/general/index",
77+
"${workspaceFolder}/integration/vscode/ada/test/workspaces/general"
6278
],
6379
// Below we make the executables of node modules visible to the tests.
6480
// In particular, vscode-tmgrammar-snap is used for syntax highlighting
6581
// tests.
6682
"env": {
83+
"MOCHA_GREP": "${input:testPattern}",
6784
// This is necessary to make the "child" vscode inherit the PATH
6885
// variable set in the workspace settings. Without it in some setups
6986
// (e.g. vscode remote) the child vscode does not get visibility
@@ -74,39 +91,13 @@
7491
// integration/vscode/ada/test/suite/index.ts to prevent timeouts in
7592
// tests when debugging
7693
"MOCHA_TIMEOUT": "0",
77-
// Setting this environment variable causes the tests to overwrite
78-
// previous test references when they are stored in files. See
79-
// assertEqualToFileContent in
80-
// integration/vscode/ada/test/suite/highlighting.test.ts
81-
"MOCHA_ALS_UPDATE": "1"
82-
},
83-
"preLaunchTask": "npm: pretest",
84-
// Switch to Debug Console to see test results
85-
"internalConsoleOptions": "openOnSessionStart"
86-
},
87-
{
88-
"name": "Server Extensions Tests",
89-
"type": "extensionHost",
90-
"request": "launch",
91-
"runtimeExecutable": "${execPath}",
92-
"outFiles": [
93-
"${workspaceFolder}/integration/vscode/ada/out/**/*.js",
94-
"!**/node_modules/**"
95-
],
96-
"args": [
97-
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
98-
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/general/serverExtensions/index",
99-
"${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
100-
],
101-
"env": {
102-
"PATH": "${env:PATH}",
103-
"MOCHA_TIMEOUT": "0"
94+
"MOCHA_ALS_UPDATE": "${input:updateTestRefs}"
10495
},
10596
"preLaunchTask": "npm: pretest",
10697
"internalConsoleOptions": "openOnSessionStart"
10798
},
10899
{
109-
"name": "GNATtest Integration Tests",
100+
"name": "GNATtest Integration Testsuite",
110101
"type": "extensionHost",
111102
"request": "launch",
112103
"runtimeExecutable": "${execPath}",
@@ -117,36 +108,7 @@
117108
"args": [
118109
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
119110
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/gnattest/index",
120-
"${workspaceFolder}/integration/vscode/ada/test/GnattestWorkspace"
121-
],
122-
"env": {
123-
"PATH": "${env:PATH}",
124-
"MOCHA_TIMEOUT": "0"
125-
},
126-
"preLaunchTask": "npm: pretest",
127-
"internalConsoleOptions": "openOnSessionStart"
128-
},
129-
{
130-
"type": "gdb",
131-
"request": "launch",
132-
"name": "Launch Program",
133-
"target": ".obj/server/ada_language_server",
134-
"cwd": "${workspaceRoot}",
135-
"valuesFormatting": "parseText"
136-
},
137-
{
138-
"name": "Extension Tests (Test Name Regexp)",
139-
"type": "extensionHost",
140-
"request": "launch",
141-
"runtimeExecutable": "${execPath}",
142-
"outFiles": [
143-
"${workspaceFolder}/integration/vscode/ada/out/**/*.js",
144-
"!**/node_modules/**"
145-
],
146-
"args": [
147-
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
148-
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index",
149-
"${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
111+
"${workspaceFolder}/integration/vscode/ada/test/workspaces/gnattest"
150112
],
151113
// Below we make the executables of node modules visible to the tests.
152114
// In particular, vscode-tmgrammar-snap is used for syntax highlighting
@@ -173,14 +135,13 @@
173135
"inputs": [
174136
{
175137
"id": "testPattern",
176-
"description": "A regexp of tests to run",
138+
"description": "A regexp of tests to run. Keep empty for not filtering any",
177139
"type": "promptString"
178140
},
179141
{
180142
"id": "updateTestRefs",
181143
"description": "Update test references? Keep empty for no update",
182-
"type": "promptString",
183-
"default": ""
144+
"type": "promptString"
184145
},
185146
{
186147
"id": "pid",

integration/vscode/ada/test/GnattestWorkspace/Makefile

Lines changed: 0 additions & 29 deletions
This file was deleted.

integration/vscode/ada/test/GnattestWorkspace/README.testing

Lines changed: 0 additions & 39 deletions
This file was deleted.

integration/vscode/ada/test/GnattestWorkspace/tagged_rec.gpr

Lines changed: 0 additions & 26 deletions
This file was deleted.

integration/vscode/ada/test/TestWorkspace/src/highlighting/obsolescent/pkg_with_obsolescent_members.ads

Lines changed: 0 additions & 16 deletions
This file was deleted.

integration/vscode/ada/test/TestWorkspace/src/highlighting/obsolescent/pkg_with_obsolescent_members.ads.sem.tokens

Lines changed: 0 additions & 5 deletions
This file was deleted.

integration/vscode/ada/test/TestWorkspace/src/highlighting/obsolescent/pkg_with_obsolescent_members.ads.snap.advanced

Lines changed: 0 additions & 57 deletions
This file was deleted.

integration/vscode/ada/test/TestWorkspace/src/highlighting/obsolescent/pkg_with_obsolescent_members.ads.snap.syntaxes

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)