Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1944 args = [source, dest, '/e', '/i']; | 1944 args = [source, dest, '/e', '/i']; |
| 1945 } | 1945 } |
| 1946 return Process.run(executable, args).then((ProcessResult result) { | 1946 return Process.run(executable, args).then((ProcessResult result) { |
| 1947 if (result.exitCode != 0) { | 1947 if (result.exitCode != 0) { |
| 1948 throw new Exception("Failed to execute '$executable " | 1948 throw new Exception("Failed to execute '$executable " |
| 1949 "${args.join(' ')}'."); | 1949 "${args.join(' ')}'."); |
| 1950 } | 1950 } |
| 1951 }); | 1951 }); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 static Future deleteDirectory(String path) { | |
| 1955 // We are seeing issues with long path names on windows when | |
| 1956 // deleting them. Use the system tools to delete our long paths. | |
| 1957 if (Platform.operatingSystem == 'windows') { | |
|
Bill Hesse
2014/08/11 09:24:13
Can we include a bug number or TODO about making d
ricow1
2014/08/11 09:37:30
Done
| |
| 1958 var native_path = new Path(path).toNativePath(); | |
| 1959 // Running this in a shell sucks, but rmdir is not part of the standard | |
| 1960 // path. | |
| 1961 return Process.run('rmdir', ['/s', '/q', native_path], runInShell: true) | |
| 1962 .then((ProcessResult result) { | |
| 1963 if (result.exitCode != 0) { | |
| 1964 throw new Exception('Can\'t delete path $native_path. ' | |
|
Bill Hesse
2014/08/11 09:24:13
Maybe you should check the length of the path befo
ricow1
2014/08/11 09:37:30
That will actually throw an ProcessException, we w
| |
| 1965 'This may be becaust the path is to long'); | |
| 1966 } | |
| 1967 }); | |
| 1968 } else { | |
| 1969 var dir = new io.Directory(path); | |
| 1970 return dir.delete(recursive: true); | |
| 1971 } | |
| 1972 } | |
| 1973 | |
| 1954 static Path debugLogfile() { | 1974 static Path debugLogfile() { |
| 1955 return new Path(".debug.log"); | 1975 return new Path(".debug.log"); |
| 1956 } | 1976 } |
| 1957 | 1977 |
| 1958 static String flakyFileName() { | 1978 static String flakyFileName() { |
| 1959 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) | 1979 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) |
| 1960 // will be written to this file. This is useful for the debugging of | 1980 // will be written to this file. This is useful for the debugging of |
| 1961 // flaky tests. | 1981 // flaky tests. |
| 1962 // When running on a built bot, the file can be made visible in the | 1982 // When running on a built bot, the file can be made visible in the |
| 1963 // waterfall UI. | 1983 // waterfall UI. |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2261 * $pass tests are expected to pass | 2281 * $pass tests are expected to pass |
| 2262 * $failOk tests are expected to fail that we won't fix | 2282 * $failOk tests are expected to fail that we won't fix |
| 2263 * $fail tests are expected to fail that we should fix | 2283 * $fail tests are expected to fail that we should fix |
| 2264 * $crash tests are expected to crash that we should fix | 2284 * $crash tests are expected to crash that we should fix |
| 2265 * $timeout tests are allowed to timeout | 2285 * $timeout tests are allowed to timeout |
| 2266 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2286 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 2267 """; | 2287 """; |
| 2268 print(report); | 2288 print(report); |
| 2269 } | 2289 } |
| 2270 } | 2290 } |
| OLD | NEW |