Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: pkg/unittest/lib/vm_config.dart

Issue 14580013: Close stdout and stderr before terminating the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: l Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/vm_config.dart
diff --git a/pkg/unittest/lib/vm_config.dart b/pkg/unittest/lib/vm_config.dart
index d8b3f2308c591f2acaa0774c353e67ee2a4d53a7..7ff2154f628deb6a13c8ccf84956c10c58b55e0a 100644
--- a/pkg/unittest/lib/vm_config.dart
+++ b/pkg/unittest/lib/vm_config.dart
@@ -7,6 +7,7 @@
*/
library unittest_vm_config;
+import 'dart:async';
import 'dart:io';
import 'unittest.dart';
@@ -38,14 +39,18 @@ class VMConfiguration extends Configuration {
}
void onDone(bool success) {
+ int status;
try {
super.onDone(success);
- exit(0);
+ status = 0;
} catch (ex) {
// A non-zero exit code is used by the test infrastructure to detect
// failure.
- exit(1);
+ status = 1;
}
+ Future.wait([stdout.close(), stderr.close()]).then((_) {
+ exit(status);
+ });
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698