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

Side by Side Diff: tools/testing/dart/test_progress.dart

Issue 16085002: Catch errors on directory listings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test_progress; 5 library test_progress;
6 6
7 import "dart:io"; 7 import "dart:io";
8 import "dart:io" as io; 8 import "dart:io" as io;
9 import "http_server.dart" as http_server; 9 import "http_server.dart" as http_server;
10 import "status_file_parser.dart"; 10 import "status_file_parser.dart";
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 return path; 302 return path;
303 } 303 }
304 304
305 void allDone() { 305 void allDone() {
306 var count = 0; 306 var count = 0;
307 var systemTempDir = _tempDir(); 307 var systemTempDir = _tempDir();
308 var lister = new Directory.fromPath(systemTempDir).list().listen( 308 var lister = new Directory.fromPath(systemTempDir).list().listen(
309 (FileSystemEntity fse) { 309 (FileSystemEntity fse) {
310 if (fse is Directory) count++; 310 if (fse is Directory) count++;
311 }, 311 },
312 onError: (error) {
313 DebugLogger.warning("Could not list temp directories, got: $error");
314 },
312 onDone: () { 315 onDone: () {
313 if (count > MIN_NUMBER_OF_TEMP_DIRS) { 316 if (count > MIN_NUMBER_OF_TEMP_DIRS) {
314 DebugLogger.warning("There are ${count} directories " 317 DebugLogger.warning("There are ${count} directories "
315 "in the system tempdir ('$systemTempDir')! " 318 "in the system tempdir ('$systemTempDir')! "
316 "Maybe left over directories?\n"); 319 "Maybe left over directories?\n");
317 } 320 }
318 }); 321 });
319 } 322 }
320 } 323 }
321 324
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 print('@@@BUILD_STEP $stepName failures@@@'); 514 print('@@@BUILD_STEP $stepName failures@@@');
512 } 515 }
513 for (String line in _failureSummary) { 516 for (String line in _failureSummary) {
514 print(line); 517 print(line);
515 } 518 }
516 print(''); 519 print('');
517 } 520 }
518 print(_buildSummaryEnd(_failedTests)); 521 print(_buildSummaryEnd(_failedTests));
519 } 522 }
520 } 523 }
OLDNEW
« 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