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

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

Issue 462523002: Use rmdir to delete pkgbuild directories on windows (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // See issue 16264.
1958 if (Platform.operatingSystem == 'windows') {
1959 var native_path = new Path(path).toNativePath();
1960 // Running this in a shell sucks, but rmdir is not part of the standard
1961 // path.
1962 return Process.run('rmdir', ['/s', '/q', native_path], runInShell: true)
1963 .then((ProcessResult result) {
1964 if (result.exitCode != 0) {
1965 throw new Exception('Can\'t delete path $native_path. '
1966 'This may be because the path is to long');
Bill Hesse 2014/08/11 10:22:17 If you are going to say this, it should say "This
ricow1 2014/08/11 10:41:26 Done.
1967 }
1968 });
1969 } else {
1970 var dir = new io.Directory(path);
1971 return dir.delete(recursive: true);
1972 }
1973 }
1974
1954 static Path debugLogfile() { 1975 static Path debugLogfile() {
1955 return new Path(".debug.log"); 1976 return new Path(".debug.log");
1956 } 1977 }
1957 1978
1958 static String flakyFileName() { 1979 static String flakyFileName() {
1959 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) 1980 // 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 1981 // will be written to this file. This is useful for the debugging of
1961 // flaky tests. 1982 // flaky tests.
1962 // When running on a built bot, the file can be made visible in the 1983 // When running on a built bot, the file can be made visible in the
1963 // waterfall UI. 1984 // waterfall UI.
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 * $pass tests are expected to pass 2282 * $pass tests are expected to pass
2262 * $failOk tests are expected to fail that we won't fix 2283 * $failOk tests are expected to fail that we won't fix
2263 * $fail tests are expected to fail that we should fix 2284 * $fail tests are expected to fail that we should fix
2264 * $crash tests are expected to crash that we should fix 2285 * $crash tests are expected to crash that we should fix
2265 * $timeout tests are allowed to timeout 2286 * $timeout tests are allowed to timeout
2266 * $compileErrorSkip tests are skipped on browsers due to compile-time error 2287 * $compileErrorSkip tests are skipped on browsers due to compile-time error
2267 """; 2288 """;
2268 print(report); 2289 print(report);
2269 } 2290 }
2270 } 2291 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698