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

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

Issue 17619013: Bugfix: make the new compilation artifact layout also work with dart2dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 commands.add(new Command(jsShellFileName, [compiledFile])); 772 commands.add(new Command(jsShellFileName, [compiledFile]));
773 } 773 }
774 return commands; 774 return commands;
775 775
776 case 'dart2dart': 776 case 'dart2dart':
777 args = new List.from(args); 777 args = new List.from(args);
778 args.add('--output-type=dart'); 778 args.add('--output-type=dart');
779 String tempDir = createOutputDirectory(info.filePath, ''); 779 String tempDir = createOutputDirectory(info.filePath, '');
780 var compiledFile = '$tempDir/out-${configuration['runtime']}.dart'; 780 var compiledFile = '$tempDir/out-${configuration['runtime']}.dart';
781 var compiledShadowFile = '$tempDir/out_shadow.dart'; 781 var compiledShadowFile = '$tempDir/out_shadow.dart';
782 args.add('--out=$tempDir/out.dart'); 782 args.add('--out=$compiledFile');
783 783
784 List<Command> commands = 784 List<Command> commands =
785 <Command>[new CompilationCommand(compiledFile, 785 <Command>[new CompilationCommand(compiledFile,
786 compiledShadowFile, 786 compiledShadowFile,
787 !useSdk, 787 !useSdk,
788 dart2JsBootstrapDependencies, 788 dart2JsBootstrapDependencies,
789 compilerPath, 789 compilerPath,
790 args)]; 790 args)];
791 if (info.hasCompileError) { 791 if (info.hasCompileError) {
792 // Do not attempt to run the compiled result. A compilation 792 // Do not attempt to run the compiled result. A compilation
793 // error should be reported by the compilation command. 793 // error should be reported by the compilation command.
794 } else if (configuration['runtime'] == 'vm') { 794 } else if (configuration['runtime'] == 'vm') {
795 // TODO(antonm): support checked. 795 // TODO(antonm): support checked.
796 var vmArguments = new List.from(vmOptions); 796 var vmArguments = new List.from(vmOptions);
797 vmArguments.addAll([ 797 vmArguments.addAll([
798 '--ignore-unrecognized-flags', '$tempDir/out.dart']); 798 '--ignore-unrecognized-flags', compiledFile]);
799 commands.add(new Command(vmFileName, vmArguments)); 799 commands.add(new Command(vmFileName, vmArguments));
800 } else { 800 } else {
801 throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart'; 801 throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart';
802 } 802 }
803 return commands; 803 return commands;
804 804
805 case 'none': 805 case 'none':
806 case 'dartc': 806 case 'dartc':
807 case 'dartanalyzer': 807 case 'dartanalyzer':
808 case 'dart2analyzer': 808 case 'dart2analyzer':
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 * $pass tests are expected to pass 1979 * $pass tests are expected to pass
1980 * $failOk tests are expected to fail that we won't fix 1980 * $failOk tests are expected to fail that we won't fix
1981 * $fail tests are expected to fail that we should fix 1981 * $fail tests are expected to fail that we should fix
1982 * $crash tests are expected to crash that we should fix 1982 * $crash tests are expected to crash that we should fix
1983 * $timeout tests are allowed to timeout 1983 * $timeout tests are allowed to timeout
1984 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1984 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1985 """; 1985 """;
1986 print(report); 1986 print(report);
1987 } 1987 }
1988 } 1988 }
OLDNEW
« tools/testing/dart/test_runner.dart ('K') | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698