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

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

Issue 527053002: Support passing in a test suite directory through a flag to the testing scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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) 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 "drt_updater.dart"; 8 import "drt_updater.dart";
9 import "test_suite.dart"; 9 import "test_suite.dart";
10 import "compiler_configuration.dart" show CompilerConfiguration; 10 import "compiler_configuration.dart" show CompilerConfiguration;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 ['--vm-options'], 419 ['--vm-options'],
420 [], 420 [],
421 null), 421 null),
422 new _TestOptionSpecification( 422 new _TestOptionSpecification(
423 'dart2js_options', 423 'dart2js_options',
424 'Extra options for dart2js compilation step', 424 'Extra options for dart2js compilation step',
425 ['--dart2js-options'], 425 ['--dart2js-options'],
426 [], 426 [],
427 null), 427 null),
428 new _TestOptionSpecification( 428 new _TestOptionSpecification(
429 'suite_dir',
430 'Additional directory to add to the testing matrix',
431 ['--suite-dir'],
432 [],
433 null),
434 new _TestOptionSpecification(
429 'exclude_suite', 435 'exclude_suite',
430 'Exclude suites from default selector, only works when no' 436 'Exclude suites from default selector, only works when no'
431 ' selector has been specified on the command line', 437 ' selector has been specified on the command line',
432 ['--exclude-suite'], 438 ['--exclude-suite'],
433 defaultTestSelectors, 439 defaultTestSelectors,
434 null),]; 440 null),];
435 } 441 }
436 442
437 443
438 /** 444 /**
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 configuration['clear_browser_cache'] = true; 708 configuration['clear_browser_cache'] = true;
703 } 709 }
704 710
705 // Expand the test selectors into a suite name and a simple 711 // Expand the test selectors into a suite name and a simple
706 // regular expressions to be used on the full path of a test file 712 // regular expressions to be used on the full path of a test file
707 // in that test suite. If no selectors are explicitly given use 713 // in that test suite. If no selectors are explicitly given use
708 // the default suite patterns. 714 // the default suite patterns.
709 var selectors = configuration['selectors']; 715 var selectors = configuration['selectors'];
710 if (selectors is !Map) { 716 if (selectors is !Map) {
711 if (selectors == null) { 717 if (selectors == null) {
718 configuration['default_selector'] = true;
712 selectors = new List.from(defaultTestSelectors); 719 selectors = new List.from(defaultTestSelectors);
713 var exclude_suites = configuration['exclude_suite'] != null ? 720 var exclude_suites = configuration['exclude_suite'] != null ?
714 configuration['exclude_suite'].split(',') : []; 721 configuration['exclude_suite'].split(',') : [];
715 for (var exclude in exclude_suites) { 722 for (var exclude in exclude_suites) {
716 if (selectors.contains(exclude)) { 723 if (selectors.contains(exclude)) {
717 selectors.remove(exclude); 724 selectors.remove(exclude);
718 } else { 725 } else {
719 print("Error: default selectors does not contain $exclude"); 726 print("Error: default selectors does not contain $exclude");
720 exit(1); 727 exit(1);
721 } 728 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 return option; 860 return option;
854 } 861 }
855 } 862 }
856 print('Unknown test option $name'); 863 print('Unknown test option $name');
857 exit(1); 864 exit(1);
858 } 865 }
859 866
860 867
861 List<_TestOptionSpecification> _options; 868 List<_TestOptionSpecification> _options;
862 } 869 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698