Skip to content

Commit b9c59ea

Browse files
authored
Set a debug name for test isolates (#2494)
2 parents e6d4877 + a1e295b commit b9c59ea

File tree

5 files changed

+27
-7
lines changed

5 files changed

+27
-7
lines changed

pkgs/test/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.26.1-wip
2+
3+
* Set a debug name for test isolates.
4+
15
## 1.26.0
26

37
* `test()` and `group()` functions now take an optional `TestLocation` that will

pkgs/test/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.26.0
2+
version: 1.26.1-wip
33
description: >-
44
A full featured library for writing and running Dart tests across platforms.
55
repository: https://github.com/dart-lang/test/tree/master/pkgs/test
@@ -37,7 +37,7 @@ dependencies:
3737

3838
# Use an exact version until the test_api and test_core package are stable.
3939
test_api: 0.7.5
40-
test_core: 0.6.9
40+
test_core: 0.6.10-wip
4141

4242
typed_data: ^1.3.0
4343
web_socket_channel: '>=2.0.0 <4.0.0'

pkgs/test_core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.10-wip
2+
3+
* Set a debug name for test isolates.
4+
15
## 0.6.9
26

37
* Add support for native assets for `dart test` in pub workspaces.

pkgs/test_core/lib/src/runner/vm/platform.dart

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,14 @@ stderr: ${processResult.stderr}''');
246246

247247
/// Runs [uri] in an isolate, passing [message].
248248
Future<Isolate> _spawnIsolateWithUri(Uri uri, SendPort message) async {
249-
return await Isolate.spawnUri(uri, [], message,
250-
packageConfig: await packageConfigUri, checked: true);
249+
return await Isolate.spawnUri(
250+
uri,
251+
[],
252+
message,
253+
packageConfig: await packageConfigUri,
254+
checked: true,
255+
debugName: 'test_suite:$uri',
256+
);
251257
}
252258

253259
Future<Isolate> _spawnPrecompiledIsolate(String testPath, SendPort message,
@@ -284,8 +290,14 @@ stderr: ${processResult.stderr}''');
284290
packageConfig = null;
285291
}
286292
}
287-
return await Isolate.spawnUri(testUri, [], message,
288-
packageConfig: packageConfig?.uri, checked: true);
293+
return await Isolate.spawnUri(
294+
testUri,
295+
[],
296+
message,
297+
packageConfig: packageConfig?.uri,
298+
checked: true,
299+
debugName: 'test_suite:$testUri',
300+
);
289301
}
290302

291303
/// Bootstraps the test at [testPath] and writes its contents to a temporary

pkgs/test_core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_core
2-
version: 0.6.9
2+
version: 0.6.10-wip
33
description: A basic library for writing tests and running them on the VM.
44
repository: https://github.com/dart-lang/test/tree/master/pkgs/test_core
55
issue_tracker: https://github.com/dart-lang/test/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest

0 commit comments

Comments
 (0)