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

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

Issue 60503002: Add browser path options to testing scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library test_options_parser; 5 library test_options_parser;
6 6
7 import "dart:io"; 7 import "dart:io";
8 import "dart:math"; 8 import "dart:math";
9 import "drt_updater.dart"; 9 import "drt_updater.dart";
10 import "test_suite.dart"; 10 import "test_suite.dart";
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 ['--drt'], 236 ['--drt'],
237 [], 237 [],
238 ''), 238 ''),
239 new _TestOptionSpecification( 239 new _TestOptionSpecification(
240 'dartium', 240 'dartium',
241 'Path to Dartium Chrome executable', 241 'Path to Dartium Chrome executable',
242 ['--dartium'], 242 ['--dartium'],
243 [], 243 [],
244 ''), 244 ''),
245 new _TestOptionSpecification( 245 new _TestOptionSpecification(
246 'firefox',
247 'Path to firefox browser executable',
248 ['--firefox'],
249 [],
250 ''),
251 new _TestOptionSpecification(
252 'chrome',
253 'Path to chrome browser executable',
254 ['--chrome'],
255 [],
256 ''),
257 new _TestOptionSpecification(
258 'safari',
259 'Path to safari browser executable',
260 ['--safari'],
261 [],
262 ''),
263 new _TestOptionSpecification(
246 'use_sdk', 264 'use_sdk',
247 '''Use compiler or runtime from the SDK. 265 '''Use compiler or runtime from the SDK.
248 266
249 Normally, the compiler or runtimes in PRODUCT_DIR is tested, with this 267 Normally, the compiler or runtimes in PRODUCT_DIR is tested, with this
250 option, the compiler or runtime in PRODUCT_DIR/dart-sdk/bin is tested. 268 option, the compiler or runtime in PRODUCT_DIR/dart-sdk/bin is tested.
251 269
252 Note: currently only implemented for dart2js.''', 270 Note: currently only implemented for dart2js.''',
253 ['--use-sdk'], 271 ['--use-sdk'],
254 [], 272 [],
255 false, 273 false,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 config['_reproducing_arguments_'] = 495 config['_reproducing_arguments_'] =
478 _constructReproducingCommandArguments(config); 496 _constructReproducingCommandArguments(config);
479 } 497 }
480 return result.isEmpty ? null : result; 498 return result.isEmpty ? null : result;
481 } 499 }
482 500
483 // For printing out reproducing command lines, we don't want to add these 501 // For printing out reproducing command lines, we don't want to add these
484 // options. 502 // options.
485 Set<String> _blacklistedOptions = new Set<String>.from([ 503 Set<String> _blacklistedOptions = new Set<String>.from([
486 'progress', 'failure-summary', 'step_name', 'report', 'tasks', 'verbose', 504 'progress', 'failure-summary', 'step_name', 'report', 'tasks', 'verbose',
487 'time', 'dart', 'drt', 'dartium', 'build_directory', 'append_logs', 505 'time', 'dart', 'drt', 'dartium', 'firefox', 'build_directory',
Bill Hesse 2013/11/05 18:21:39 Add the two other ones here.
488 'local_ip', 'shard', 'shards', 506 'append_logs', 'local_ip', 'shard', 'shards',
489 ]); 507 ]);
490 508
491 List<String> _constructReproducingCommandArguments(Map config) { 509 List<String> _constructReproducingCommandArguments(Map config) {
492 var arguments = new List<String>(); 510 var arguments = new List<String>();
493 for (var configKey in config.keys) { 511 for (var configKey in config.keys) {
494 if (!_blacklistedOptions.contains(configKey)) { 512 if (!_blacklistedOptions.contains(configKey)) {
495 for (var option in _options) { 513 for (var option in _options) {
496 var configValue = config[configKey]; 514 var configValue = config[configKey];
497 // We only include entries of [conf] if we find an option for it. 515 // We only include entries of [conf] if we find an option for it.
498 if (configKey == option.name && configValue != option.defaultValue) { 516 if (configKey == option.name && configValue != option.defaultValue) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 return option; 798 return option;
781 } 799 }
782 } 800 }
783 print('Unknown test option $name'); 801 print('Unknown test option $name');
784 exit(1); 802 exit(1);
785 } 803 }
786 804
787 805
788 List<_TestOptionSpecification> _options; 806 List<_TestOptionSpecification> _options;
789 } 807 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698