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

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

Issue 2855073002: Small-scale clean ups in test.dart, mainly around test_progress. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 var csp = configuration['csp'] ? '-csp' : ''; 1962 var csp = configuration['csp'] ? '-csp' : '';
1963 var sdk = configuration['use_sdk'] ? '-sdk' : ''; 1963 var sdk = configuration['use_sdk'] ? '-sdk' : '';
1964 var dirName = "${configuration['compiler']}" 1964 var dirName = "${configuration['compiler']}"
1965 "$checked$strong$minified$csp$sdk"; 1965 "$checked$strong$minified$csp$sdk";
1966 String generatedPath = "${TestUtils.buildDir(configuration)}" 1966 String generatedPath = "${TestUtils.buildDir(configuration)}"
1967 "/generated_compilations/$dirName"; 1967 "/generated_compilations/$dirName";
1968 TestUtils.deleteDirectory(generatedPath); 1968 TestUtils.deleteDirectory(generatedPath);
1969 } 1969 }
1970 } 1970 }
1971 1971
1972 static Path debugLogfile() { 1972 static final debugLogFilePath = new Path(".debug.log");
1973 return new Path(".debug.log");
1974 }
1975 1973
1976 static String flakyFileName() { 1974 /// If a flaky test did fail, infos about it (i.e. test name, stdin, stdout)
1977 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) 1975 /// will be written to this file.
1978 // will be written to this file. This is useful for the debugging of 1976 ///
1979 // flaky tests. 1977 /// This is useful for debugging flaky tests. When running on a buildbot, the
1980 // When running on a built bot, the file can be made visible in the 1978 /// file can be made visible in the waterfall UI.
1981 // waterfall UI. 1979 static const flakyFileName = ".flaky.log";
1982 return ".flaky.log";
1983 }
1984 1980
1985 static String testOutcomeFileName() { 1981 /// If test.py was invoked with '--write-test-outcome-log it will write
1986 // If test.py was invoked with '--write-test-outcome-log it will write 1982 /// test outcomes to this file.
1987 // test outcomes to this file. 1983 static const testOutcomeFileName = ".test-outcome.log";
1988 return ".test-outcome.log";
1989 }
1990 1984
1991 static void ensureExists(String filename, Map configuration) { 1985 static void ensureExists(String filename, Map configuration) {
1992 if (!configuration['list'] && !existsCache.doesFileExist(filename)) { 1986 if (!configuration['list'] && !existsCache.doesFileExist(filename)) {
1993 throw "'$filename' does not exist"; 1987 throw "'$filename' does not exist";
1994 } 1988 }
1995 } 1989 }
1996 1990
1997 static Path absolutePath(Path path) { 1991 static Path absolutePath(Path path) {
1998 if (!path.isAbsolute) { 1992 if (!path.isAbsolute) {
1999 return currentWorkingDirectory.join(path); 1993 return currentWorkingDirectory.join(path);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 } 2229 }
2236 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { 2230 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) {
2237 ++shortNameCounter; 2231 ++shortNameCounter;
2238 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); 2232 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH);
2239 path = "short${shortNameCounter}_$pathEnd"; 2233 path = "short${shortNameCounter}_$pathEnd";
2240 } 2234 }
2241 } 2235 }
2242 return path; 2236 return path;
2243 } 2237 }
2244 } 2238 }
OLDNEW
« tools/testing/dart/test_progress.dart ('K') | « tools/testing/dart/test_progress.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698