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

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

Issue 2610943002: Remove 'pkg' from the default list of test suites (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « tools/bots/gn_tests.py ('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) 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 "path.dart"; 10 import "path.dart";
11 import "compiler_configuration.dart" show CompilerConfiguration; 11 import "compiler_configuration.dart" show CompilerConfiguration;
12 import "runtime_configuration.dart" show RuntimeConfiguration; 12 import "runtime_configuration.dart" show RuntimeConfiguration;
13 13
14 const List<String> defaultTestSelectors = const [ 14 const List<String> defaultTestSelectors = const [
15 'samples', 15 'samples',
16 'standalone', 16 'standalone',
17 'corelib', 17 'corelib',
18 'co19', 18 'co19',
19 'language', 19 'language',
20 'isolate', 20 'isolate',
21 'vm', 21 'vm',
22 'html', 22 'html',
23 'benchmark_smoke', 23 'benchmark_smoke',
24 'utils', 24 'utils',
25 'lib', 25 'lib',
26 'pkg',
kustermann 2017/01/04 17:33:40 We need to be careful here. I'm asking for pkg to
27 'analyze_library', 26 'analyze_library',
28 'service', 27 'service',
29 'kernel', 28 'kernel',
30 'observatory_ui' 29 'observatory_ui'
31 ]; 30 ];
32 31
33 /** 32 /**
34 * Specification of a single test option. 33 * Specification of a single test option.
35 * 34 *
36 * The name of the specification is used as the key for the option in 35 * The name of the specification is used as the key for the option in
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 'packages', 472 'packages',
474 'The package spec file to use for testing.', 473 'The package spec file to use for testing.',
475 ['--packages'], 474 ['--packages'],
476 [], 475 [],
477 null), 476 null),
478 new _TestOptionSpecification( 477 new _TestOptionSpecification(
479 'exclude_suite', 478 'exclude_suite',
480 'Exclude suites from default selector, only works when no' 479 'Exclude suites from default selector, only works when no'
481 ' selector has been specified on the command line', 480 ' selector has been specified on the command line',
482 ['--exclude-suite'], 481 ['--exclude-suite'],
483 defaultTestSelectors, 482 [],
484 null), 483 null),
485 new _TestOptionSpecification( 484 new _TestOptionSpecification(
486 'skip-compilation', 485 'skip-compilation',
487 'Skip the compilation step, using the compilation artifacts left in ' 486 'Skip the compilation step, using the compilation artifacts left in '
488 ' the output folder from a previous run.' 487 ' the output folder from a previous run.'
489 'This flag will often cause false positves and negatives, but can be' 488 'This flag will often cause false positves and negatives, but can be'
490 ' useful for quick-and-dirty offline testing when not making changes' 489 ' useful for quick-and-dirty offline testing when not making changes'
491 ' that affect the compiler.', 490 ' that affect the compiler.',
492 ['--skip-compilation'], 491 ['--skip-compilation'],
493 [], 492 [],
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 break; 727 break;
729 } 728 }
730 if (!validRuntimes.contains(config['runtime'])) { 729 if (!validRuntimes.contains(config['runtime'])) {
731 isValid = false; 730 isValid = false;
732 print("Warning: combination of compiler '${config['compiler']}' and " 731 print("Warning: combination of compiler '${config['compiler']}' and "
733 "runtime '${config['runtime']}' is invalid. " 732 "runtime '${config['runtime']}' is invalid. "
734 "Skipping this combination."); 733 "Skipping this combination.");
735 } 734 }
736 if (config['ie'] && Platform.operatingSystem != 'windows') { 735 if (config['ie'] && Platform.operatingSystem != 'windows') {
737 isValid = false; 736 isValid = false;
738 print("Warning cannot run Internet Explorer on non-Windows operating" 737 print("Warning: cannot run Internet Explorer on non-Windows operating"
739 " system."); 738 " system.");
740 } 739 }
741 if (config['shard'] < 1 || config['shard'] > config['shards']) { 740 if (config['shard'] < 1 || config['shard'] > config['shards']) {
742 isValid = false; 741 isValid = false;
743 print("Error: shard index is ${config['shard']} out of " 742 print("Error: shard index is ${config['shard']} out of "
744 "${config['shards']} shards"); 743 "${config['shards']} shards");
745 } 744 }
746 745
747 if (config['use_repository_packages'] && config['use_public_packages']) { 746 if (config['use_repository_packages'] && config['use_public_packages']) {
748 isValid = false; 747 isValid = false;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 selectors = new List.from(defaultTestSelectors); 812 selectors = new List.from(defaultTestSelectors);
814 } 813 }
815 814
816 var exclude_suites = configuration['exclude_suite'] != null 815 var exclude_suites = configuration['exclude_suite'] != null
817 ? configuration['exclude_suite'].split(',') 816 ? configuration['exclude_suite'].split(',')
818 : []; 817 : [];
819 for (var exclude in exclude_suites) { 818 for (var exclude in exclude_suites) {
820 if (selectors.contains(exclude)) { 819 if (selectors.contains(exclude)) {
821 selectors.remove(exclude); 820 selectors.remove(exclude);
822 } else { 821 } else {
823 print("Error: default selectors does not contain $exclude"); 822 print("Warning: default selectors does not contain $exclude");
824 exit(1);
825 } 823 }
826 } 824 }
827 } 825 }
828 Map<String, RegExp> selectorMap = new Map<String, RegExp>(); 826 Map<String, RegExp> selectorMap = new Map<String, RegExp>();
829 for (var i = 0; i < selectors.length; i++) { 827 for (var i = 0; i < selectors.length; i++) {
830 var pattern = selectors[i]; 828 var pattern = selectors[i];
831 var suite = pattern; 829 var suite = pattern;
832 var slashLocation = pattern.indexOf('/'); 830 var slashLocation = pattern.indexOf('/');
833 if (slashLocation != -1) { 831 if (slashLocation != -1) {
834 suite = pattern.substring(0, slashLocation); 832 suite = pattern.substring(0, slashLocation);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 if (option.keys.contains(name)) { 999 if (option.keys.contains(name)) {
1002 return option; 1000 return option;
1003 } 1001 }
1004 } 1002 }
1005 print('Unknown test option $name'); 1003 print('Unknown test option $name');
1006 exit(1); 1004 exit(1);
1007 } 1005 }
1008 1006
1009 List<_TestOptionSpecification> _options; 1007 List<_TestOptionSpecification> _options;
1010 } 1008 }
OLDNEW
« no previous file with comments | « tools/bots/gn_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698