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

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

Issue 25876002: test.py: Propagate the global --dartium option to the browser controller (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « tools/testing/dart/test_runner.dart ('k') | tools/testing/dart/utils.dart » ('j') | 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 // Note: If we run test.py with the "--list" option, no http servers 902 // Note: If we run test.py with the "--list" option, no http servers
903 // will be started. So we use PORT/CROSS_ORIGIN_PORT instead of real ports. 903 // will be started. So we use PORT/CROSS_ORIGIN_PORT instead of real ports.
904 var serverPort = "PORT"; 904 var serverPort = "PORT";
905 var crossOriginPort = "CROSS_ORIGIN_PORT"; 905 var crossOriginPort = "CROSS_ORIGIN_PORT";
906 if (!configuration['list']) { 906 if (!configuration['list']) {
907 assert(configuration.containsKey('_servers_')); 907 assert(configuration.containsKey('_servers_'));
908 serverPort = configuration['_servers_'].port; 908 serverPort = configuration['_servers_'].port;
909 crossOriginPort = configuration['_servers_'].crossOriginPort; 909 crossOriginPort = configuration['_servers_'].crossOriginPort;
910 } 910 }
911 911
912 var local_ip = configuration['local_ip']; 912 var localIp = configuration['local_ip'];
913 var url= 'http://$local_ip:$serverPort$pathComponent' 913 var url= 'http://$localIp:$serverPort$pathComponent'
914 '?crossOriginPort=$crossOriginPort'; 914 '?crossOriginPort=$crossOriginPort';
915 if (info.optionsFromFile['isMultiHtmlTest'] && subtestNames.length > 0) { 915 if (info.optionsFromFile['isMultiHtmlTest'] && subtestNames.length > 0) {
916 url= '${url}&group=${subtestNames[subtestIndex]}'; 916 url= '${url}&group=${subtestNames[subtestIndex]}';
917 } 917 }
918 return url; 918 return url;
919 } 919 }
920 920
921 void _createWrapperFile(String dartWrapperFilename, 921 void _createWrapperFile(String dartWrapperFilename,
922 Path dartLibraryFilename, 922 Path dartLibraryFilename,
923 {bool useUnittestWrapper: false}) { 923 {bool useUnittestWrapper: false}) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 runtime, fullHtmlPath, 1128 runtime, fullHtmlPath,
1129 TestUtils.dartTestExecutable.toString(), args, configurationDir)); 1129 TestUtils.dartTestExecutable.toString(), args, configurationDir));
1130 } else if (TestUtils.usesWebDriver(runtime)) { 1130 } else if (TestUtils.usesWebDriver(runtime)) {
1131 args = [ 1131 args = [
1132 dartDir.append('tools/testing/run_selenium.py').toNativePath(), 1132 dartDir.append('tools/testing/run_selenium.py').toNativePath(),
1133 '--browser=$runtime', 1133 '--browser=$runtime',
1134 // NOTE: This value will be overridden by the test runner 1134 // NOTE: This value will be overridden by the test runner
1135 '--timeout=${configuration['timeout']}', 1135 '--timeout=${configuration['timeout']}',
1136 '--out=$fullHtmlPath']; 1136 '--out=$fullHtmlPath'];
1137 if (runtime == 'dartium') { 1137 if (runtime == 'dartium') {
1138 args.add('--executable=$dartiumFilename'); 1138 var dartiumLocation = Locations.getDartiumLocation(configuration);
1139 args.add('--executable=$dartiumLocation');
1139 } 1140 }
1140 if (subtestIndex != 0) { 1141 if (subtestIndex != 0) {
1141 args.add('--force-refresh'); 1142 args.add('--force-refresh');
1142 } 1143 }
1143 commandSet.add(CommandBuilder.instance.getSeleniumTestCommand( 1144 commandSet.add(CommandBuilder.instance.getSeleniumTestCommand(
1144 runtime, fullHtmlPath, 'python', args, configurationDir)); 1145 runtime, fullHtmlPath, 'python', args, configurationDir));
1145 } else { 1146 } else {
1146 assert(runtime == "drt"); 1147 assert(runtime == "drt");
1147 1148
1148 var dartFlags = []; 1149 var dartFlags = [];
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 return configuration['drt']; 1302 return configuration['drt'];
1302 } 1303 }
1303 if (Platform.operatingSystem == 'macos') { 1304 if (Platform.operatingSystem == 'macos') {
1304 final path = dartDir.append( 1305 final path = dartDir.append(
1305 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell'); 1306 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell');
1306 return path.toNativePath(); 1307 return path.toNativePath();
1307 } 1308 }
1308 return dartDir.append('client/tests/drt/content_shell').toNativePath(); 1309 return dartDir.append('client/tests/drt/content_shell').toNativePath();
1309 } 1310 }
1310 1311
1311 String get dartiumFilename {
1312 if (configuration['dartium'] != '') {
1313 return configuration['dartium'];
1314 }
1315 if (Platform.operatingSystem == 'macos') {
1316 return dartDir.append('client/tests/dartium/Chromium.app/Contents/'
1317 'MacOS/Chromium').toNativePath();
1318 }
1319 return dartDir.append('client/tests/dartium/chrome').toNativePath();
1320 }
1321
1322 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) { 1312 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) {
1323 List args = TestUtils.standardOptions(configuration); 1313 List args = TestUtils.standardOptions(configuration);
1324 1314
1325 String packageRoot = packageRootArgument(optionsFromFile['packageRoot']); 1315 String packageRoot = packageRootArgument(optionsFromFile['packageRoot']);
1326 if (packageRoot != null) { 1316 if (packageRoot != null) {
1327 args.add(packageRoot); 1317 args.add(packageRoot);
1328 } 1318 }
1329 args.addAll(additionalOptions(filePath)); 1319 args.addAll(additionalOptions(filePath));
1330 if (configuration['analyzer']) { 1320 if (configuration['analyzer']) {
1331 args.add('--machine'); 1321 args.add('--machine');
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 * $pass tests are expected to pass 2060 * $pass tests are expected to pass
2071 * $failOk tests are expected to fail that we won't fix 2061 * $failOk tests are expected to fail that we won't fix
2072 * $fail tests are expected to fail that we should fix 2062 * $fail tests are expected to fail that we should fix
2073 * $crash tests are expected to crash that we should fix 2063 * $crash tests are expected to crash that we should fix
2074 * $timeout tests are allowed to timeout 2064 * $timeout tests are allowed to timeout
2075 * $compileErrorSkip tests are skipped on browsers due to compile-time error 2065 * $compileErrorSkip tests are skipped on browsers due to compile-time error
2076 """; 2066 """;
2077 print(report); 2067 print(report);
2078 } 2068 }
2079 } 2069 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | tools/testing/dart/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698