Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Change return type on the `body` callback argument to `group` to `void` from
`dynamic`. This may surface cases where the group callback was erroneously
returning an ignored value.
* Fix a hang when a test run with `--compiler exe` crashes.

## 1.30.0

Expand Down
39 changes: 39 additions & 0 deletions pkgs/test/test/runner/subprocess_crash_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library;

import 'package:test/test.dart';
import 'package:test_descriptor/test_descriptor.dart' as d;

import '../io.dart';

void main() {
setUpAll(precompileTestExecutable);

test('gracefully handles an early test suite exit', () async {
await d.file('test.dart', '''
import 'dart:io';

import 'package:test/test.dart';

void main() {
test('runs', () {});
test('exits', () {
exit(0);
});
}''').create();

var test = await runTest(['--compiler', 'exe', 'test.dart']);
expect(
test.stdout,
containsInOrder([
'+1: [VM, Exe] exits - did not complete [E]',
'+1: Some tests failed.',
]),
);
await test.shouldExit(1);
});
}
1 change: 1 addition & 0 deletions pkgs/test_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Change return type on the `body` callback argument to `group` to `void` from
`dynamic`. This may surface cases where the group callback was erroneously
returning an ignored value.
* Fix a hang when a test run with `--compiler exe` crashes.

## 0.6.16

Expand Down
1 change: 1 addition & 0 deletions pkgs/test_core/lib/src/runner/vm/platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class VMPlatform extends PlatformPlugin {
outerChannel = MultiChannel<Object?>(jsonSocketStreamChannel(socket));
cleanupCallbacks
..add(serverSocket.close)
..add(socket.destroy)
..add(process.kill);
} else {
var receivePort = ReceivePort();
Expand Down
Loading