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

Unified Diff: client/testing/unittest/unittest_node.dart

Issue 9168031: Make client tests return non-zero exit code on failure. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | client/testing/unittest/unittest_vm.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/testing/unittest/unittest_node.dart
diff --git a/client/testing/unittest/unittest_node.dart b/client/testing/unittest/unittest_node.dart
index 108eb91bce500601485a6330768735dd529f2452..7c741539282db2c0cb1e0be0ed7ec0b75680607b 100644
--- a/client/testing/unittest/unittest_node.dart
+++ b/client/testing/unittest/unittest_node.dart
@@ -36,11 +36,18 @@ _platformCompleteTests(int testsPassed, int testsFailed, int testsErrors) {
// Show the summary.
print('');
+ var success = false;
if (testsPassed == 0 && testsFailed == 0 && testsErrors == 0) {
print('No tests found.');
+ // This is considered a failure too: if this happens you probably have a
+ // bug in your unit tests.
} else if (testsFailed == 0 && testsErrors == 0) {
print('All $testsPassed tests passed.');
+ success = true;
} else {
print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS');
}
+
+ // A non-zero exit code is used by the test infrastructure to detect failure.
+ if (!success) process.exit(1);
}
« no previous file with comments | « no previous file | client/testing/unittest/unittest_vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698