| OLD | NEW |
| 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:async"; | 7 import "dart:async"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 import "dart:io" as io; | 9 import "dart:io" as io; |
| 10 import "dart:convert" show JSON; | 10 import "dart:convert" show JSON; |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 static RegExp _getTemporaryDirectoryRegexp() { | 457 static RegExp _getTemporaryDirectoryRegexp() { |
| 458 // These are the patterns of temporary directory names created by | 458 // These are the patterns of temporary directory names created by |
| 459 // 'Directory.systemTemp.createTemp()' on linux/macos and windows. | 459 // 'Directory.systemTemp.createTemp()' on linux/macos and windows. |
| 460 if (['macos', 'linux'].contains(Platform.operatingSystem)) { | 460 if (['macos', 'linux'].contains(Platform.operatingSystem)) { |
| 461 return new RegExp(r'^temp_dir1_......$'); | 461 return new RegExp(r'^temp_dir1_......$'); |
| 462 } else { | 462 } else { |
| 463 return new RegExp(r'tempdir-........-....-....-....-............$'); | 463 return new RegExp(r'tempdir-........-....-....-....-............$'); |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 | 466 |
| 467 static Stream<Directory> getLeftOverTemporaryDirectories() { | 467 static Stream<FileSystemEntity> getLeftOverTemporaryDirectories() { |
| 468 var regExp = _getTemporaryDirectoryRegexp(); | 468 var regExp = _getTemporaryDirectoryRegexp(); |
| 469 return Directory.systemTemp.list().where( | 469 return Directory.systemTemp.list().where( |
| 470 (FileSystemEntity fse) { | 470 (FileSystemEntity fse) { |
| 471 if (fse is Directory) { | 471 if (fse is Directory) { |
| 472 if (regExp.hasMatch(new Path(fse.path).filename)) { | 472 if (regExp.hasMatch(new Path(fse.path).filename)) { |
| 473 return true; | 473 return true; |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 return false; | 476 return false; |
| 477 }); | 477 }); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 return new VerboseProgressIndicator(startTime); | 676 return new VerboseProgressIndicator(startTime); |
| 677 case 'status': | 677 case 'status': |
| 678 return new ProgressIndicator(startTime); | 678 return new ProgressIndicator(startTime); |
| 679 case 'buildbot': | 679 case 'buildbot': |
| 680 return new BuildbotProgressIndicator(startTime); | 680 return new BuildbotProgressIndicator(startTime); |
| 681 default: | 681 default: |
| 682 assert(false); | 682 assert(false); |
| 683 break; | 683 break; |
| 684 } | 684 } |
| 685 } | 685 } |
| OLD | NEW |