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

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
« no previous file with comments | « tools/testing/dart/test_options.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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 dart2JsBootstrapDependencies, compilerPath, args, 787 dart2JsBootstrapDependencies, compilerPath, args,
788 configurationDir)]; 788 configurationDir)];
789 if (info.hasCompileError) { 789 if (info.hasCompileError) {
790 // Do not attempt to run the compiled result. A compilation 790 // Do not attempt to run the compiled result. A compilation
791 // error should be reported by the compilation command. 791 // error should be reported by the compilation command.
792 } else if (configuration['runtime'] == 'vm') { 792 } else if (configuration['runtime'] == 'vm') {
793 // TODO(antonm): support checked. 793 // TODO(antonm): support checked.
794 var vmArguments = new List.from(vmOptions); 794 var vmArguments = new List.from(vmOptions);
795 vmArguments.addAll([ 795 vmArguments.addAll([
796 '--ignore-unrecognized-flags', '$tempDir/out.dart']); 796 '--ignore-unrecognized-flags', '$tempDir/out.dart']);
797 // Turn off fancy stacks or stack filtering.
798 if (configuration['raw-stacks']) {
ricow1 2013/08/21 12:44:10 does this work, adding flags _after_ the dart file
ahe 2013/08/21 12:48:21 This is a flag to the Dart program, not the Dart V
gram 2013/08/21 17:12:38 Yes, these are passed to the Dart test. As it prov
799 vmArguments.add('--no-fancy-stacks');
800 } else if (!configuration['filter-stacks']) {
801 vmArguments.add('--no-filtered-stacks');
802 }
797 commands.add(CommandBuilder.instance.getCommand( 803 commands.add(CommandBuilder.instance.getCommand(
798 "vm", vmFileName, vmArguments, configurationDir)); 804 "vm", vmFileName, vmArguments, configurationDir));
799 } else { 805 } else {
800 throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart'; 806 throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart';
801 } 807 }
802 return commands; 808 return commands;
803 809
804 case 'none': 810 case 'none':
805 var arguments = new List.from(vmOptions); 811 var arguments = new List.from(vmOptions);
806 arguments.addAll(args); 812 arguments.addAll(args);
813 // Turn off fancy stacks.
814 if (configuration['raw-stacks']) {
815 arguments.add('--no-fancy-stacks');
816 } else if (!configuration['filter-stacks']) {
817 arguments.add('--no-filtered-stacks');
818 }
807 return <Command>[CommandBuilder.instance.getCommand( 819 return <Command>[CommandBuilder.instance.getCommand(
808 'vm', dartShellFileName, arguments, configurationDir)]; 820 'vm', dartShellFileName, arguments, configurationDir)];
809 821
810 case 'dartanalyzer': 822 case 'dartanalyzer':
811 case 'dart2analyzer': 823 case 'dart2analyzer':
812 return <Command>[CommandBuilder.instance.getAnalysisCommand( 824 return <Command>[CommandBuilder.instance.getAnalysisCommand(
813 compiler, dartShellFileName, args, configurationDir, 825 compiler, dartShellFileName, args, configurationDir,
814 flavor: compiler)]; 826 flavor: compiler)];
815 827
816 default: 828 default:
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 RandomAccessFile htmlTest = 971 RandomAccessFile htmlTest =
960 new File(htmlPath).openSync(mode: FileMode.WRITE); 972 new File(htmlPath).openSync(mode: FileMode.WRITE);
961 String content = null; 973 String content = null;
962 Path dir = filePath.directoryPath; 974 Path dir = filePath.directoryPath;
963 String nameNoExt = filePath.filenameWithoutExtension; 975 String nameNoExt = filePath.filenameWithoutExtension;
964 Path pngPath = dir.append('$nameNoExt.png'); 976 Path pngPath = dir.append('$nameNoExt.png');
965 Path txtPath = dir.append('$nameNoExt.txt'); 977 Path txtPath = dir.append('$nameNoExt.txt');
966 Path expectedOutput = null; 978 Path expectedOutput = null;
967 if (new File.fromPath(pngPath).existsSync()) { 979 if (new File.fromPath(pngPath).existsSync()) {
968 expectedOutput = pngPath; 980 expectedOutput = pngPath;
969 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath")); 981 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"),
982 !configuration['raw-stacks'], configuration['filter-stacks']);
970 } else if (new File.fromPath(txtPath).existsSync()) { 983 } else if (new File.fromPath(txtPath).existsSync()) {
971 expectedOutput = txtPath; 984 expectedOutput = txtPath;
972 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath")); 985 content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"),
986 !configuration['raw-stacks'], configuration['filter-stacks']);
973 } else { 987 } else {
974 content = getHtmlContents(filename, scriptType, 988 content = getHtmlContents(filename, scriptType,
975 new Path("$scriptPath")); 989 new Path("$scriptPath"), !configuration['raw-stacks'],
990 configuration['filter-stacks']);
976 } 991 }
977 htmlTest.writeStringSync(content); 992 htmlTest.writeStringSync(content);
978 htmlTest.closeSync(); 993 htmlTest.closeSync();
979 994
980 // Construct the command(s) that compile all the inputs needed by the 995 // 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. 996 // browser test. For running Dart in DRT, this will be noop commands.
982 List<Command> commands = []; 997 List<Command> commands = [];
983 if (compiler != 'none') { 998 if (compiler != 'none') {
984 commands.add(_compileCommand( 999 commands.add(_compileCommand(
985 dartWrapperFilename, compiledDartWrapperFilename, 1000 dartWrapperFilename, compiledDartWrapperFilename,
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 * $pass tests are expected to pass 1970 * $pass tests are expected to pass
1956 * $failOk tests are expected to fail that we won't fix 1971 * $failOk tests are expected to fail that we won't fix
1957 * $fail tests are expected to fail that we should fix 1972 * $fail tests are expected to fail that we should fix
1958 * $crash tests are expected to crash that we should fix 1973 * $crash tests are expected to crash that we should fix
1959 * $timeout tests are allowed to timeout 1974 * $timeout tests are allowed to timeout
1960 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1975 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1961 """; 1976 """;
1962 print(report); 1977 print(report);
1963 } 1978 }
1964 } 1979 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698