Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1b28c20

Browse files
authored
Adds vscode workspace with impeller test runner (#55291)
This PR removes our checked in .vscode files and instead starts a vscode workspace for the engine. As a first step I've added build tasks for the arm64 `impeller_unittests`. I also setup C++ TestMate so that we can easily navigate to tests and execute them. The tests will be rebuilt before each execution. The goal would be that eventually all of our c++ tests can be listed here. This is going to make external contribution much easier and make it so I don't have to keep editing the "launch.json" file to run specific tests. ![ezgif-2-bcd582b44e](https://github.com/user-attachments/assets/11cea32e-628f-4626-b87d-9d3ebfe11357) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent b805bf6 commit 1b28c20

File tree

6 files changed

+261
-20
lines changed

6 files changed

+261
-20
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ xcuserdata
4949
.project
5050
.settings/
5151
.vscode/
52-
!.vscode/extensions.json
5352

5453
# packages file containing multi-root paths
5554
.packages.generated

.vscode/extensions.json

-17
This file was deleted.

ci/licenses_golden/excluded_files

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
../../../flutter/.github
1919
../../../flutter/.gitignore
2020
../../../flutter/.style.yapf
21-
../../../flutter/.vscode
2221
../../../flutter/AUTHORS
2322
../../../flutter/CODEOWNERS
2423
../../../flutter/CONTRIBUTING.md
@@ -50,6 +49,7 @@
5049
../../../flutter/display_list/utils/dl_accumulation_rect_unittests.cc
5150
../../../flutter/display_list/utils/dl_matrix_clip_tracker_unittests.cc
5251
../../../flutter/docs
52+
../../../flutter/engine.code-workspace
5353
../../../flutter/examples
5454
../../../flutter/flow/README.md
5555
../../../flutter/flow/diff_context_unittests.cc

ci/licenses_golden/tool_signature

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Signature: 53025d1261891c38c7bccb158862e09f
1+
Signature: 8859e172e060ecb45aa665c3119d5d25
22

engine.code-workspace

+258
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {
8+
"files.associations": {
9+
"optional": "cpp",
10+
"__bit_reference": "cpp",
11+
"__bits": "cpp",
12+
"__config": "cpp",
13+
"__debug": "cpp",
14+
"__errc": "cpp",
15+
"__hash_table": "cpp",
16+
"__locale": "cpp",
17+
"__mutex_base": "cpp",
18+
"__node_handle": "cpp",
19+
"__nullptr": "cpp",
20+
"__split_buffer": "cpp",
21+
"__string": "cpp",
22+
"__threading_support": "cpp",
23+
"__tree": "cpp",
24+
"__tuple": "cpp",
25+
"any": "cpp",
26+
"array": "cpp",
27+
"atomic": "cpp",
28+
"bitset": "cpp",
29+
"cctype": "cpp",
30+
"chrono": "cpp",
31+
"cinttypes": "cpp",
32+
"clocale": "cpp",
33+
"cmath": "cpp",
34+
"codecvt": "cpp",
35+
"compare": "cpp",
36+
"complex": "cpp",
37+
"concepts": "cpp",
38+
"condition_variable": "cpp",
39+
"csignal": "cpp",
40+
"cstdarg": "cpp",
41+
"cstddef": "cpp",
42+
"cstdint": "cpp",
43+
"cstdio": "cpp",
44+
"cstdlib": "cpp",
45+
"cstring": "cpp",
46+
"ctime": "cpp",
47+
"cwchar": "cpp",
48+
"cwctype": "cpp",
49+
"deque": "cpp",
50+
"exception": "cpp",
51+
"forward_list": "cpp",
52+
"fstream": "cpp",
53+
"future": "cpp",
54+
"initializer_list": "cpp",
55+
"iomanip": "cpp",
56+
"ios": "cpp",
57+
"iosfwd": "cpp",
58+
"iostream": "cpp",
59+
"istream": "cpp",
60+
"limits": "cpp",
61+
"list": "cpp",
62+
"locale": "cpp",
63+
"map": "cpp",
64+
"memory": "cpp",
65+
"mutex": "cpp",
66+
"new": "cpp",
67+
"numeric": "cpp",
68+
"ostream": "cpp",
69+
"queue": "cpp",
70+
"random": "cpp",
71+
"ratio": "cpp",
72+
"regex": "cpp",
73+
"set": "cpp",
74+
"span": "cpp",
75+
"sstream": "cpp",
76+
"stack": "cpp",
77+
"stdexcept": "cpp",
78+
"streambuf": "cpp",
79+
"string": "cpp",
80+
"string_view": "cpp",
81+
"strstream": "cpp",
82+
"system_error": "cpp",
83+
"tuple": "cpp",
84+
"type_traits": "cpp",
85+
"typeinfo": "cpp",
86+
"unordered_map": "cpp",
87+
"unordered_set": "cpp",
88+
"valarray": "cpp",
89+
"variant": "cpp",
90+
"vector": "cpp",
91+
"algorithm": "cpp",
92+
"filesystem": "cpp",
93+
"memory_resource": "cpp",
94+
"bit": "cpp",
95+
"charconv": "cpp",
96+
"format": "cpp",
97+
"functional": "cpp",
98+
"iterator": "cpp",
99+
"utility": "cpp",
100+
"__assert": "cpp",
101+
"*.inc": "cpp",
102+
"__verbose_abort": "cpp",
103+
"*.def": "cpp",
104+
"*.hpp11": "cpp",
105+
"__functional_base": "cpp",
106+
"shared_mutex": "cpp",
107+
"coroutine": "cpp",
108+
"hash_map": "cpp",
109+
"hash_set": "cpp",
110+
"thread": "cpp",
111+
"propagate_const": "cpp",
112+
"*.gen": "cpp",
113+
"simd": "cpp",
114+
"barrier": "cpp",
115+
"cuchar": "cpp",
116+
"latch": "cpp",
117+
"numbers": "cpp",
118+
"scoped_allocator": "cpp",
119+
"semaphore": "cpp",
120+
"typeindex": "cpp",
121+
"__std_stream": "cpp",
122+
"*.ipp": "cpp",
123+
"csetjmp": "cpp",
124+
"cfenv": "cpp"
125+
},
126+
"C_Cpp.default.includePath": [
127+
"${default}",
128+
"${workspaceFolder}/..",
129+
"${workspaceFolder}",
130+
],
131+
"dotnet.defaultSolution": "disable",
132+
"dart.showTodos": false,
133+
"testMate.cpp.test.advancedExecutables": [
134+
{
135+
"name": "impeller_unittests_arm64",
136+
"pattern": "../out/host_debug_unopt_arm64/impeller_unittests",
137+
"runTask": {
138+
"before": [
139+
"impeller_unittests_arm64"
140+
]
141+
},
142+
"gtest": {
143+
"prependTestRunningArgs": [
144+
"--enable_playground"
145+
]
146+
}
147+
}
148+
],
149+
"testMate.cpp.debug.configTemplate": {
150+
"type": "cppvsdbg",
151+
"linux": {
152+
"type": "cppdbg",
153+
"MIMode": "gdb"
154+
},
155+
"darwin": {
156+
"type": "cppdbg",
157+
"MIMode": "lldb",
158+
"setupCommands": [
159+
{
160+
"description": "Source map",
161+
"text": "settings set target.source-map \"flutter/\" \"${workspaceFolder}\"",
162+
"ignoreFailures": false
163+
}
164+
],
165+
},
166+
"win32": {
167+
"type": "cppvsdbg"
168+
},
169+
"program": "${exec}",
170+
"args": "${argsArray}",
171+
"cwd": "${cwd}",
172+
"env": "${envObj}",
173+
"environment": "${envObjArray}",
174+
"sourceFileMap": "${sourceFileMapObj}",
175+
}
176+
},
177+
"tasks": {
178+
"version": "2.0.0",
179+
"tasks": [
180+
{
181+
"label": "impeller_unittests_arm64",
182+
"type": "shell",
183+
"command": "./flutter/bin/et",
184+
"args": [
185+
"build",
186+
"-c",
187+
"host_debug_unopt_arm64",
188+
"//flutter/impeller:impeller_unittests"
189+
],
190+
"options": {
191+
"cwd": "${workspaceFolder}/.."
192+
},
193+
"problemMatcher": [
194+
"$gcc"
195+
],
196+
"presentation": {
197+
"echo": true,
198+
"reveal": "always",
199+
"focus": false,
200+
"panel": "shared",
201+
"clear": true
202+
},
203+
"group": {
204+
"kind": "build",
205+
}
206+
}
207+
]
208+
},
209+
"extensions": {
210+
"recommendations": [
211+
// C++ TestMate
212+
"matepek.vscode-catch2-test-adapter",
213+
// Uses github-styled markdown preview, which supports more features than the default markdown preview.
214+
"bierner.github-markdown-preview",
215+
// Flutter and Dart extensions.
216+
"Dart-Code.dart-code",
217+
// Supports C/C++ in the engine.
218+
// See https://github.com/flutter/engine/blob/main/docs/contributing/Setting-up-the-Engine-development-environment.md#vscode-with-cc-intellisense-cc
219+
"llvm-vs-code-extensions.vscode-clangd",
220+
// Auto-formats C/C++ code.
221+
// https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#cc
222+
"xaver.clang-format",
223+
]
224+
},
225+
"launch": {
226+
"version": "0.2.0",
227+
"configurations": [
228+
{
229+
"name": "impeller_unittests_arm64",
230+
"type": "cppdbg",
231+
"request": "launch",
232+
"program": "${workspaceFolder}/../out/host_debug_unopt_arm64/impeller_unittests",
233+
"args": [
234+
"--enable_playground",
235+
],
236+
"stopAtEntry": false,
237+
"cwd": "${workspaceFolder}/../out/host_debug_unopt_arm64",
238+
"environment": [],
239+
"externalConsole": false,
240+
"MIMode": "lldb",
241+
"setupCommands": [
242+
{
243+
"description": "Enable pretty-printing for lldb",
244+
"text": "settings set target.pretty-printing true",
245+
"ignoreFailures": true
246+
},
247+
{
248+
"description": "Source map",
249+
"text": "settings set target.source-map \"flutter/\" \"${workspaceFolder}\"",
250+
"ignoreFailures": false
251+
}
252+
],
253+
"preLaunchTask": "impeller_unittests_arm64",
254+
}
255+
],
256+
"compounds": []
257+
}
258+
}

tools/licenses/lib/paths.dart

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ final Set<String> skippedPaths = <String>{
2525
r'flutter/buildtools', // only used by build
2626
r'flutter/ci',
2727
r'flutter/docs',
28+
r'flutter/engine.code-workspace',
2829
r'flutter/flutter_frontend_server',
2930
r'flutter/impeller/docs',
3031
r'flutter/lib/web_ui/build', // this is compiler-generated output

0 commit comments

Comments
 (0)