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

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

Issue 22859009: Changes to how we handle fancy stacks: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 RandomAccessFile htmlTest = 959 RandomAccessFile htmlTest =
960 new File(htmlPath).openSync(mode: FileMode.WRITE); 960 new File(htmlPath).openSync(mode: FileMode.WRITE);
961 String content = null; 961 String content = null;
962 Path dir = filePath.directoryPath; 962 Path dir = filePath.directoryPath;
963 String nameNoExt = filePath.filenameWithoutExtension; 963 String nameNoExt = filePath.filenameWithoutExtension;
964 Path pngPath = dir.append('$nameNoExt.png'); 964 Path pngPath = dir.append('$nameNoExt.png');
965 Path txtPath = dir.append('$nameNoExt.txt'); 965 Path txtPath = dir.append('$nameNoExt.txt');
966 Path expectedOutput = null; 966 Path expectedOutput = null;
967 if (new File.fromPath(pngPath).existsSync()) { 967 if (new File.fromPath(pngPath).existsSync()) {
968 expectedOutput = pngPath; 968 expectedOutput = pngPath;
969 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath")); 969 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"),
970 configuration['fancy_stacks']);
970 } else if (new File.fromPath(txtPath).existsSync()) { 971 } else if (new File.fromPath(txtPath).existsSync()) {
971 expectedOutput = txtPath; 972 expectedOutput = txtPath;
972 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath")); 973 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"),
974 configuration['fancy_stacks']);
973 } else { 975 } else {
974 content = getHtmlContents(filename, scriptType, 976 content = getHtmlContents(filename, scriptType,
975 new Path("$scriptPath")); 977 new Path("$scriptPath"), configuration['fancy_stacks']);
976 } 978 }
977 htmlTest.writeStringSync(content); 979 htmlTest.writeStringSync(content);
978 htmlTest.closeSync(); 980 htmlTest.closeSync();
979 981
980 // Construct the command(s) that compile all the inputs needed by the 982 // Construct the command(s) that compile all the inputs needed by the
981 // browser test. For running Dart in DRT, this will be noop commands. 983 // browser test. For running Dart in DRT, this will be noop commands.
982 List<Command> commands = []; 984 List<Command> commands = [];
983 if (compiler != 'none') { 985 if (compiler != 'none') {
984 commands.add(_compileCommand( 986 commands.add(_compileCommand(
985 dartWrapperFilename, compiledDartWrapperFilename, 987 dartWrapperFilename, compiledDartWrapperFilename,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 var executable_name = dartOptions[0]; 1232 var executable_name = dartOptions[0];
1231 // TODO(ager): Get rid of this hack when the runtime checkout goes away. 1233 // TODO(ager): Get rid of this hack when the runtime checkout goes away.
1232 var file = new File(executable_name); 1234 var file = new File(executable_name);
1233 if (!file.existsSync()) { 1235 if (!file.existsSync()) {
1234 executable_name = '../$executable_name'; 1236 executable_name = '../$executable_name';
1235 assert(new File(executable_name).existsSync()); 1237 assert(new File(executable_name).existsSync());
1236 dartOptions[0] = executable_name; 1238 dartOptions[0] = executable_name;
1237 } 1239 }
1238 args.addAll(dartOptions); 1240 args.addAll(dartOptions);
1239 } 1241 }
1242 // Turn off fancy stacks.
1243 if (!configuration['fancy_stacks']) {
1244 args.add('--no-fancy-stacks');
1245 }
1240 1246
1241 return args; 1247 return args;
1242 } 1248 }
1243 1249
1244 String packageRoot(String packageRootFromFile) { 1250 String packageRoot(String packageRootFromFile) {
1245 if (packageRootFromFile == "none") { 1251 if (packageRootFromFile == "none") {
1246 return null; 1252 return null;
1247 } 1253 }
1248 String packageRoot = packageRootFromFile; 1254 String packageRoot = packageRootFromFile;
1249 if (packageRootFromFile == null) { 1255 if (packageRootFromFile == null) {
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 * $pass tests are expected to pass 1961 * $pass tests are expected to pass
1956 * $failOk tests are expected to fail that we won't fix 1962 * $failOk tests are expected to fail that we won't fix
1957 * $fail tests are expected to fail that we should fix 1963 * $fail tests are expected to fail that we should fix
1958 * $crash tests are expected to crash that we should fix 1964 * $crash tests are expected to crash that we should fix
1959 * $timeout tests are allowed to timeout 1965 * $timeout tests are allowed to timeout
1960 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1966 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1961 """; 1967 """;
1962 print(report); 1968 print(report);
1963 } 1969 }
1964 } 1970 }
OLDNEW
« tools/testing/dart/test_options.dart ('K') | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698