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

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

Issue 91473002: Checked-in binary update to v1.0.0.3 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « dart/tools/testing/dart/test_options.dart ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_progress.dart
diff --git a/dart/tools/testing/dart/test_progress.dart b/dart/tools/testing/dart/test_progress.dart
index 80b00a0616321a7d777e5a5922655a3d2879d511..ea31bfc59268b486fa1ba665b2125069885294b1 100644
--- a/dart/tools/testing/dart/test_progress.dart
+++ b/dart/tools/testing/dart/test_progress.dart
@@ -7,7 +7,6 @@ library test_progress;
import "dart:async";
import "dart:io";
import "dart:io" as io;
-import "http_server.dart" as http_server;
import "status_file_parser.dart";
import "test_runner.dart";
import "test_suite.dart";
@@ -323,17 +322,9 @@ class SkippedCompilationsPrinter extends EventListener {
class LeftOverTempDirPrinter extends EventListener {
final MIN_NUMBER_OF_TEMP_DIRS = 50;
- static Directory _getTemporaryDirectory() {
- // Dir will be located in the system temporary directory.
- var dir = new Directory('').createTempSync();
- var path = new Path(dir.path).directoryPath;
- dir.deleteSync();
- return new Directory(path.toNativePath());
- }
-
static RegExp _getTemporaryDirectoryRegexp() {
// These are the patterns of temporary directory names created by
- // 'Directory.createTempSync()' on linux/macos and windows.
+ // 'Directory.systemTemp.createTemp()' on linux/macos and windows.
if (['macos', 'linux'].contains(Platform.operatingSystem)) {
return new RegExp(r'^temp_dir1_......$');
} else {
@@ -343,7 +334,7 @@ class LeftOverTempDirPrinter extends EventListener {
static Stream<Directory> getLeftOverTemporaryDirectories() {
var regExp = _getTemporaryDirectoryRegexp();
- return _getTemporaryDirectory().list().where(
+ return Directory.systemTemp.list().where(
(FileSystemEntity fse) {
if (fse is Directory) {
if (regExp.hasMatch(new Path(fse.path).filename)) {
@@ -359,7 +350,7 @@ class LeftOverTempDirPrinter extends EventListener {
if (count > MIN_NUMBER_OF_TEMP_DIRS) {
DebugLogger.warning("There are ${count} directories "
"in the system tempdir "
- "('${_getTemporaryDirectory().path}')! "
+ "('${Directory.systemTemp.path}')! "
"Maybe left over directories?\n");
}
}).catchError((error) {
« no previous file with comments | « dart/tools/testing/dart/test_options.dart ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698