ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / scripts / test-integration.sh 345 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
#!/usr/bin/env bash
set -e
if [ [ "$OSTYPE " == "darwin" * ] ] ; then
realpath ( ) { [ [ $1 = /* ] ] && echo "$1 " || echo "$PWD /${1# ./ } " ; }
ROOT = $( dirname $( dirname $( realpath "$0 " ) ) )
else
ROOT = $( dirname $( dirname $( readlink -f $0
false
--help -h
true
--run
--grep -g -f
--runGlob --glob --runGrep
--suite
*
false
true
PATTERNS
/.build/crashes
/.build/logs/integration-tests
false
should_run_suite
true
--
./scripts/test-agent-host-e2e.ts
./scripts/test.sh
./scripts/test.sh
--
--grep
should_run_suite api-folder
/extensions/vscode-api-tests/testWorkspace --enable-proposed-api vscode.vscode-api-tests /extensions/vscode-api-tests /extensions/vscode-api-tests/out/singlefolder-tests
kill_app
should_run_suite api-workspace
/extensions/vscode-api-tests/testworkspace.code-workspace --enable-proposed-api vscode.vscode-api-tests /extensions/vscode-api-tests /extensions/vscode-api-tests/out/workspace-tests
kill_app
should_run_suite colorize
run test-extension -- vscode-colorize-tests
kill_app
should_run_suite terminal-suggest
run test-extension -- terminal-suggest --enable-proposed-api vscode.vscode-api-tests
kill_app
should_run_suite typescript
/extensions/typescript-language-features/test-workspace /extensions/typescript-language-features /extensions/typescript-language-features/out/test/unit
kill_app
should_run_suite markdown
run test-extension -- markdown-language-features
kill_app
should_run_suite emmet
/extensions/emmet/test-workspace /extensions/emmet /extensions/emmet/out/test
kill_app
should_run_suite
/extensions/git /extensions/git/out/test
kill_app
should_run_suite git-base
run test-extension -- git-base
kill_app
should_run_suite ipynb
run test-extension -- ipynb
kill_app
should_run_suite notebook-renderers
run test-extension -- notebook-renderers
kill_app
should_run_suite configuration-editing
run test-extension -- configuration-editing
kill_app
should_run_suite github-authentication
run test-extension -- github-authentication
kill_app
should_run_suite copilot
run test-extension -- copilot
kill_app
should_run_suite css
test/index.js
should_run_suite html
test/index.js
--
)
)
)
fi
cd
"$ROOT "
EXTRA_ARGS
=
(
)
RUN_FILE
=
""
RUN_GLOB
=
""
GREP_PATTERN
=
""
SUITE_FILTER
=
""
HELP
=
AGENT_HOST_E2E_GLOB
=
"**/agentHost/test/node/e2e/{providers/*AgentHostE2E,conformance/*}.integrationTest.js"
while
[
[
$#
-gt
0
]
]
;
do
case
"$1 "
in
|
)
HELP
=
shift
;
;
)
RUN_FILE
=
"$2 "
EXTRA_ARGS
+=
(
"$1 "
"$2 "
)
shift
2
;
;
|
|
)
GREP_PATTERN
=
"$2 "
EXTRA_ARGS
+=
(
"$1 "
"$2 "
)
shift
2
;
;
|
|
)
RUN_GLOB
=
"$2 "
EXTRA_ARGS
+=
(
"$1 "
"$2 "
)
shift
2
;
;
)
SUITE_FILTER
=
"$2 "
shift
2
;
;
)
EXTRA_ARGS
+=
(
"$1 "
)
shift
;
;
esac
done
KNOWN_SUITES
=
"api-folder api-workspace colorize terminal-suggest typescript markdown emmet git git-base ipynb notebook-renderers configuration-editing github-authentication copilot css html"
if
$HELP
;
then
echo
"Usage: $0 [options]"
echo
""
echo
"Runs integration tests. When no filters are given, all integration tests"
echo
"(node.js integration tests + extension host tests) are run."
echo
"Agent Host E2E entrypoints run in parallel before the remaining node.js tests."
echo
""
echo
"--run and --runGlob select which node.js integration test files to load."
echo
"Extension host tests are skipped when these options are used."
echo
""
echo
"--grep filters test cases by name across all test runners. When used alone,"
echo
"the pattern is applied to both node.js integration tests and all extension"
echo
"host suites. When combined with --suite, only the selected suites are run."
echo
""
echo
"--suite selects which extension host test suites to run."
echo
"Node.js integration tests are skipped when this option is used."
echo
""
echo
"Options:"
echo
" --run <file> run tests from a specific file (src/ path)"
echo
" --runGlob, --glob <pattern> select test files by path glob (e.g. '**/editor/**/*.integrationTest.js')"
echo
" --grep, -g, -f <pattern> filter test cases by name (matched against test titles)"
echo
" --suite <pattern> run only matching extension host test suites"
echo
" supports comma-separated list and glob patterns"
echo
" --help, -h show this help"
echo
""
echo
"Available suites: $KNOWN_SUITES "
echo
""
echo
"All other options are forwarded to the node.js test runner (see scripts/test.sh --help)."
echo
"Note: extra options are not forwarded to extension host suites (--suite mode)."
echo
""
echo
"Examples:"
echo
" $0 # run all integration tests"
echo
" $0 --run src/vs/editor/test/browser/controller.integrationTest.ts"
echo
" $0 --grep 'some test name'"
echo
" $0 --runGlob '**/editor/**/*.integrationTest.js'"
echo
" $0 --suite git # run only Git tests"
echo
" $0 --suite 'api*' # run API folder + workspace tests"
echo
" $0 --suite 'git,emmet,typescript' # run multiple suites"
echo
" $0 --suite api-folder --grep 'some test' # grep within a suite"
exit
0
fi
HAS_FILTER
=
if
[
[
-n
"$RUN_FILE "
||
-n
"$RUN_GLOB "
]
]
;
then
HAS_FILTER
=
fi
should_run_suite
(
)
{
if
[
[
-z
"$SUITE_FILTER "
]
]
;
then
return
0
fi
IFS
=
','
read
-ra
<<<
"$SUITE_FILTER "
for
pattern
in
"${PATTERNS[ @] } "
;
do
pattern
=
"${pattern## } "
pattern
=
"${pattern%% } "
if
[
[
"$1 "
==
$pattern
]
]
;
then
return
0
fi
done
return
1
}
VSCODEUSERDATADIR
=
` mktemp -d 2 > /dev/null`
VSCODECRASHDIR
=
$ROOT
VSCODELOGSDIR
=
$ROOT
mkdir
-p
"$VSCODEUSERDATADIR /User"
cat
>
"$VSCODEUSERDATADIR /User/settings.json"
<<
EOF
{
"chat.notifyWindowOnConfirmation": "off",
"chat.notifyWindowOnResponseReceived": "off"
}
EOF
if
[
-z
"$INTEGRATION_TEST_ELECTRON_PATH "
]
then
INTEGRATION_TEST_ELECTRON_PATH
=
"./scripts/code.sh"
echo
"Running integration tests out of sources."
else
export
VSCODE_CLI
=
1
export
ELECTRON_ENABLE_LOGGING
=
1
echo
"Running integration tests with '$INTEGRATION_TEST_ELECTRON_PATH ' as build."
fi
echo
"Storing crash reports into '$VSCODECRASHDIR '."
echo
"Storing log files into '$VSCODELOGSDIR '."
if
[
[
-n
"$SUITE_FILTER "
]
]
;
then
SUITE_MATCHED
=
for
suite
in
$KNOWN_SUITES
;
do
if
"$suite "
;
then
SUITE_MATCHED
=
break
fi
done
if
[
[
"$SUITE_MATCHED "
==
"false"
]
]
;
then
echo
"Error: no suites match filter '$SUITE_FILTER '"
echo
"Available suites: $KNOWN_SUITES "
rm
-rf
"$VSCODEUSERDATADIR "
exit
1
fi
fi
if
[
[
-z
"$SUITE_FILTER "
]
]
;
then
echo
echo
"### node.js integration tests"
echo
if
[
[
-z
"$RUN_GLOB "
&&
-z
"$RUN_FILE "
]
]
;
then
if
[
[
"$VSCODE_SKIP_AGENT_HOST_E2E "
==
"1"
]
]
;
then
echo
"Skipping Agent Host E2E tests because no relevant files changed."
else
node
"${EXTRA_ARGS[ @] } "
fi
VSCODE_SKIP_PRELAUNCH
=
1
--runGlob
"**/*.integrationTest.js"
--excludeRunGlob
"$AGENT_HOST_E2E_GLOB "
"${EXTRA_ARGS[ @] } "
else
"${EXTRA_ARGS[ @] } "
fi
fi
if
[
[
-z
"$SUITE_FILTER "
]
]
&&
$HAS_FILTER
;
then
echo
""
echo
"Filter active, skipping extension host tests."
rm
-rf
"$VSCODEUSERDATADIR "
exit
0
fi
GREP_ARGS
=
(
)
if
[
[
-n
"$GREP_PATTERN "
]
]
;
then
export
MOCHA_GREP
=
"$GREP_PATTERN "
GREP_ARGS
=
(
"$GREP_PATTERN "
)
fi
API_TESTS_EXTRA_ARGS
=
"--disable-telemetry --disable-experiments --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR "
if
[
-z
"$INTEGRATION_TEST_APP_NAME "
]
;
then
kill_app
(
)
{
true
;
}
else
kill_app
(
)
{
killall
$INTEGRATION_TEST_APP_NAME
||
true
;
}
fi
if
;
then
echo
echo
"### API tests (folder)"
echo
"$INTEGRATION_TEST_ELECTRON_PATH "
$ROOT
=
--extensionDevelopmentPath
=
$ROOT
--extensionTestsPath
=
$ROOT
$API_TESTS_EXTRA_ARGS
fi
if
;
then
echo
echo
"### API tests (workspace)"
echo
"$INTEGRATION_TEST_ELECTRON_PATH "
$ROOT
=
--extensionDevelopmentPath
=
$ROOT
--extensionTestsPath
=
$ROOT
$API_TESTS_EXTRA_ARGS
fi
if
;
then
echo
echo
"### Colorize tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Terminal Suggest tests"
echo
npm
-l
=
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### TypeScript tests"
echo
"$INTEGRATION_TEST_ELECTRON_PATH "
$ROOT
--extensionDevelopmentPath
=
$ROOT
--extensionTestsPath
=
$ROOT
$API_TESTS_EXTRA_ARGS
fi
if
;
then
echo
echo
"### Markdown tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Emmet tests"
echo
"$INTEGRATION_TEST_ELECTRON_PATH "
$ROOT
--extensionDevelopmentPath
=
$ROOT
--extensionTestsPath
=
$ROOT
$API_TESTS_EXTRA_ARGS
fi
if
git
;
then
echo
echo
"### Git tests"
echo
"$INTEGRATION_TEST_ELECTRON_PATH "
$( mktemp -d 2 > /dev/null)
--extensionDevelopmentPath
=
$ROOT
--extensionTestsPath
=
$ROOT
$API_TESTS_EXTRA_ARGS
fi
if
;
then
echo
echo
"### Git Base tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Ipynb tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Notebook Output tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Configuration editing tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### GitHub Authentication tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### Copilot tests"
echo
npm
-l
"${GREP_ARGS[ @] } "
fi
if
;
then
echo
echo
"### CSS tests"
echo
cd
"$ROOT /extensions/css-language-features/server"
&&
"$ROOT /scripts/node-electron.sh"
fi
if
;
then
echo
echo
"### HTML tests"
echo
cd
"$ROOT /extensions/html-language-features/server"
&&
"$ROOT /scripts/node-electron.sh"
fi
rm
-rf
"$VSCODEUSERDATADIR "