|
25 | 25 | // debug instance on the same workspace as the development instance.
|
26 | 26 | // So you can checkout a second copy of the ALS repository under
|
27 | 27 | // ../als-rt and use it with the following line.
|
28 |
| - "${workspaceFolder}/../als-rt" |
| 28 | + // "${workspaceFolder}/../als-rt" |
| 29 | + "${workspaceFolder}/integration/vscode/ada/test/TestWorkspace" |
29 | 30 | ],
|
30 |
| - "preLaunchTask": "npm: compile" |
| 31 | + "preLaunchTask": "npm: compile", |
| 32 | + "env": { |
| 33 | + // This is necessary to make the "child" vscode inherit the PATH |
| 34 | + // variable set in the workspace settings. Without it in some setups |
| 35 | + // (e.g. vscode remote) the child vscode does not get visibility |
| 36 | + // over the Ada toolchain available in the parent vscode |
| 37 | + // environment. |
| 38 | + "PATH": "${env:PATH}" |
| 39 | + } |
31 | 40 | },
|
32 | 41 | {
|
33 | 42 | "name": "Extension Tests",
|
|
43 | 52 | "--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index",
|
44 | 53 | "${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
|
45 | 54 | ],
|
| 55 | + // Below we make the executables of node modules visible to the tests. |
| 56 | + // In particular, vscode-tmgrammar-snap is used for syntax highlighting |
| 57 | + // tests. |
46 | 58 | "env": {
|
| 59 | + // This is necessary to make the "child" vscode inherit the PATH |
| 60 | + // variable set in the workspace settings. Without it in some setups |
| 61 | + // (e.g. vscode remote) the child vscode does not get visibility |
| 62 | + // over the Ada toolchain available in the parent vscode |
| 63 | + // environment. |
| 64 | + "PATH": "${env:PATH}", |
47 | 65 | // This is custom env var that we use in
|
48 | 66 | // integration/vscode/ada/test/suite/index.ts to prevent timeouts in
|
49 | 67 | // tests when debugging
|
50 | 68 | "MOCHA_TIMEOUT": "0"
|
51 | 69 | },
|
52 |
| - // Below we make the executables of node modules visible to the tests. |
53 |
| - // In particular, vscode-tmgrammar-snap is used for syntax highlighting |
54 |
| - // tests. |
55 |
| - "windows": { |
56 |
| - "env": { |
57 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin;${env:PATH}" |
58 |
| - } |
59 |
| - }, |
60 |
| - "osx": { |
61 |
| - "env": { |
62 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin:${env:PATH}" |
63 |
| - } |
64 |
| - }, |
65 |
| - "linux": { |
66 |
| - "env": { |
67 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin:${env:PATH}" |
68 |
| - } |
69 |
| - }, |
70 | 70 | "preLaunchTask": "npm: pretest"
|
71 | 71 | },
|
72 | 72 | {
|
|
83 | 83 | "--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index",
|
84 | 84 | "${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
|
85 | 85 | ],
|
| 86 | + // Below we make the executables of node modules visible to the tests. |
| 87 | + // In particular, vscode-tmgrammar-snap is used for syntax highlighting |
| 88 | + // tests. |
86 | 89 | "env": {
|
| 90 | + // This is necessary to make the "child" vscode inherit the PATH |
| 91 | + // variable set in the workspace settings. Without it in some setups |
| 92 | + // (e.g. vscode remote) the child vscode does not get visibility |
| 93 | + // over the Ada toolchain available in the parent vscode |
| 94 | + // environment. |
| 95 | + "PATH": "${env:PATH}", |
87 | 96 | // This is custom env var that we use in
|
88 | 97 | // integration/vscode/ada/test/suite/index.ts to prevent timeouts in
|
89 | 98 | // tests when debugging
|
|
94 | 103 | // integration/vscode/ada/test/suite/highlighting.test.ts
|
95 | 104 | "MOCHA_ALS_UPDATE": "1"
|
96 | 105 | },
|
97 |
| - // Below we make the executables of node modules visible to the tests. |
98 |
| - // In particular, vscode-tmgrammar-snap is used for syntax highlighting |
99 |
| - // tests. |
100 |
| - "windows": { |
101 |
| - "env": { |
102 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin;${env:PATH}" |
103 |
| - } |
104 |
| - }, |
105 |
| - "osx": { |
106 |
| - "env": { |
107 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin:${env:PATH}" |
108 |
| - } |
109 |
| - }, |
110 |
| - "linux": { |
111 |
| - "env": { |
112 |
| - "PATH": "${workspaceFolder}/integration/vscode/ada/node_modules/.bin:${env:PATH}" |
113 |
| - } |
114 |
| - }, |
115 | 106 | "preLaunchTask": "npm: pretest"
|
116 | 107 | },
|
117 | 108 | {
|
|
121 | 112 | "target": ".obj/server/ada_language_server",
|
122 | 113 | "cwd": "${workspaceRoot}",
|
123 | 114 | "valuesFormatting": "parseText"
|
| 115 | + }, |
| 116 | + { |
| 117 | + "name": "Extension Tests (Test Name Regexp)", |
| 118 | + "type": "extensionHost", |
| 119 | + "request": "launch", |
| 120 | + "runtimeExecutable": "${execPath}", |
| 121 | + "outFiles": [ |
| 122 | + "${workspaceFolder}/integration/vscode/ada/out/**/*.js", |
| 123 | + "!**/node_modules/**" |
| 124 | + ], |
| 125 | + "args": [ |
| 126 | + "--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada", |
| 127 | + "--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index", |
| 128 | + "${workspaceFolder}/integration/vscode/ada/test/TestWorkspace" |
| 129 | + ], |
| 130 | + // Below we make the executables of node modules visible to the tests. |
| 131 | + // In particular, vscode-tmgrammar-snap is used for syntax highlighting |
| 132 | + // tests. |
| 133 | + "env": { |
| 134 | + "MOCHA_GREP": "${input:testPattern}", |
| 135 | + // This is necessary to make the "child" vscode inherit the PATH |
| 136 | + // variable set in the workspace settings. Without it in some setups |
| 137 | + // (e.g. vscode remote) the child vscode does not get visibility |
| 138 | + // over the Ada toolchain available in the parent vscode |
| 139 | + // environment. |
| 140 | + "PATH": "${env:PATH}", |
| 141 | + // This is custom env var that we use in |
| 142 | + // integration/vscode/ada/test/suite/index.ts to prevent timeouts in |
| 143 | + // tests when debugging |
| 144 | + "MOCHA_TIMEOUT": "0" |
| 145 | + }, |
| 146 | + "preLaunchTask": "npm: pretest" |
| 147 | + } |
| 148 | + ], |
| 149 | + "inputs": [ |
| 150 | + { |
| 151 | + "id": "testPattern", |
| 152 | + "description": "A regexp of tests to run", |
| 153 | + "type": "promptString" |
124 | 154 | }
|
125 | 155 | ]
|
126 | 156 | }
|
0 commit comments