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

Unified Diff: tools/testing/dart/test_progress.dart

Issue 2848103002: Move test.dart into testing/dart. (Closed)
Patch Set: Remove pointless LeftOverTempDirPrinter class. Created 3 years, 8 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 | « tools/testing/dart/test_configurations.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index cadbceb4ff6ebfca5e35a69617a5c030a9767514..58a932a52c3a0c028440d5535b0422894a01db33 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -4,7 +4,6 @@
library test_progress;
-import "dart:async";
import "dart:io";
import "dart:io" as io;
import "dart:convert" show JSON;
@@ -502,45 +501,6 @@ class SkippedCompilationsPrinter extends EventListener {
}
}
-class LeftOverTempDirPrinter extends EventListener {
- final MIN_NUMBER_OF_TEMP_DIRS = 50;
-
- static RegExp _getTemporaryDirectoryRegexp() {
- // These are the patterns of temporary directory names created by
- // 'Directory.systemTemp.createTemp()' on linux/macos and windows.
- if (['macos', 'linux'].contains(Platform.operatingSystem)) {
- return new RegExp(r'^temp_dir1_......$');
- } else {
- return new RegExp(r'tempdir-........-....-....-....-............$');
- }
- }
-
- static Stream<FileSystemEntity> getLeftOverTemporaryDirectories() {
- var regExp = _getTemporaryDirectoryRegexp();
- return Directory.systemTemp.list().where((FileSystemEntity fse) {
- if (fse is Directory) {
- if (regExp.hasMatch(new Path(fse.path).filename)) {
- return true;
- }
- }
- return false;
- });
- }
-
- void allDone() {
- getLeftOverTemporaryDirectories().length.then((int count) {
- if (count > MIN_NUMBER_OF_TEMP_DIRS) {
- DebugLogger.warning("There are ${count} directories "
- "in the system tempdir "
- "('${Directory.systemTemp.path}')! "
- "Maybe left over directories?\n");
- }
- }).catchError((error) {
- DebugLogger.warning("Could not list temp directories, got: $error");
- });
- }
-}
-
class LineProgressIndicator extends EventListener {
void done(TestCase test) {
var status = 'pass';
« no previous file with comments | « tools/testing/dart/test_configurations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698