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

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

Issue 24730002: Automatically append ".js" on spawnUri if we are running in JavaScript. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove todo. Created 7 years, 2 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 | « tests/isolate/spawn_uri_test.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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 if (compiler != 'none') { 1040 if (compiler != 'none') {
1041 commands.add(_compileCommand( 1041 commands.add(_compileCommand(
1042 dartWrapperFilename, compiledDartWrapperFilename, 1042 dartWrapperFilename, compiledDartWrapperFilename,
1043 compiler, tempDir, vmOptions, optionsFromFile)); 1043 compiler, tempDir, vmOptions, optionsFromFile));
1044 } 1044 }
1045 1045
1046 // some tests require compiling multiple input scripts. 1046 // some tests require compiling multiple input scripts.
1047 List<String> otherScripts = optionsFromFile['otherScripts']; 1047 List<String> otherScripts = optionsFromFile['otherScripts'];
1048 for (String name in otherScripts) { 1048 for (String name in otherScripts) {
1049 Path namePath = new Path(name); 1049 Path namePath = new Path(name);
1050 String baseName = namePath.filenameWithoutExtension; 1050 String baseName = namePath.filenameWithoutExtension;
kustermann 2013/09/26 09:34:34 I'd change this to String filename = namePath.file
floitsch 2013/09/26 10:56:15 Done.
1051 Path fromPath = filePath.directoryPath.join(namePath); 1051 Path fromPath = filePath.directoryPath.join(namePath);
1052 if (compiler != 'none') { 1052 if (compiler != 'none') {
1053 assert(namePath.extension == 'dart'); 1053 assert(namePath.extension == 'dart');
1054 commands.add(_compileCommand( 1054 commands.add(_compileCommand(
1055 fromPath.toNativePath(), '$tempDir/$baseName.js', 1055 fromPath.toNativePath(), '$tempDir/$baseName.dart.js',
kustermann 2013/09/26 09:34:34 Then you can do change this to fromPath.toNativePa
floitsch 2013/09/26 10:56:15 Done.
1056 compiler, tempDir, vmOptions, optionsFromFile)); 1056 compiler, tempDir, vmOptions, optionsFromFile));
1057 } 1057 }
1058 if (compiler == 'none') { 1058 if (compiler == 'none') {
1059 // For the tests that require multiple input scripts but are not 1059 // For the tests that require multiple input scripts but are not
1060 // compiled, move the input scripts over with the script so they can 1060 // compiled, move the input scripts over with the script so they can
1061 // be accessed. 1061 // be accessed.
1062 String result = new File(fromPath.toNativePath()).readAsStringSync(); 1062 String result = new File(fromPath.toNativePath()).readAsStringSync();
1063 new File('$tempDir/$baseName.dart').writeAsStringSync(result); 1063 new File('$tempDir/$baseName.dart').writeAsStringSync(result);
kustermann 2013/09/26 09:34:34 And this to new File('$tempDir/$filename').writeAs
floitsch 2013/09/26 10:56:15 Done.
1064 } 1064 }
1065 } 1065 }
1066 1066
1067 1067
1068 // Variables for browser multi-tests. 1068 // Variables for browser multi-tests.
1069 List<String> subtestNames = info.optionsFromFile['subtestNames']; 1069 List<String> subtestNames = info.optionsFromFile['subtestNames'];
1070 int subtestIndex = 0; 1070 int subtestIndex = 0;
1071 // Construct the command that executes the browser test 1071 // Construct the command that executes the browser test
1072 do { 1072 do {
1073 List<Command> commandSet = new List<Command>.from(commands); 1073 List<Command> commandSet = new List<Command>.from(commands);
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 * $pass tests are expected to pass 2029 * $pass tests are expected to pass
2030 * $failOk tests are expected to fail that we won't fix 2030 * $failOk tests are expected to fail that we won't fix
2031 * $fail tests are expected to fail that we should fix 2031 * $fail tests are expected to fail that we should fix
2032 * $crash tests are expected to crash that we should fix 2032 * $crash tests are expected to crash that we should fix
2033 * $timeout tests are allowed to timeout 2033 * $timeout tests are allowed to timeout
2034 * $compileErrorSkip tests are skipped on browsers due to compile-time error 2034 * $compileErrorSkip tests are skipped on browsers due to compile-time error
2035 """; 2035 """;
2036 print(report); 2036 print(report);
2037 } 2037 }
2038 } 2038 }
OLDNEW
« no previous file with comments | « tests/isolate/spawn_uri_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698