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

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

Issue 2549793002: Add 'self_check' runtime for running self-checking unit tests (Closed)
Patch Set: Make runTest return a future, and fix == and hashCode Created 4 years 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
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";
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 dartium: Run Dart or JavaScript in Dartium. 114 dartium: Run Dart or JavaScript in Dartium.
115 115
116 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell 116 ContentShellOnAndroid: Run Dart or JavaScript in Dartium content shell
117 on Android. 117 on Android.
118 118
119 DartiumOnAndroid: Run Dart or Javascript in Dartium on Android. 119 DartiumOnAndroid: Run Dart or Javascript in Dartium on Android.
120 120
121 [ff | chrome | safari | ie9 | ie10 | ie11 | opera | chromeOnAndroid]: 121 [ff | chrome | safari | ie9 | ie10 | ie11 | opera | chromeOnAndroid]:
122 Run JavaScript in the specified browser. 122 Run JavaScript in the specified browser.
123 123
124 self_check: Pass each test or its compiled output to every file under
125 `pkg` whose name ends with `_self_check.dart`.
126 Each test is given to the self_check tester as a filename on stdin using
127 the batch-mode protocol.
128
124 none: No runtime, compile only (for example, used for dart2analyzer static 129 none: No runtime, compile only (for example, used for dart2analyzer static
125 analysis tests).''', 130 analysis tests).''',
126 ['-r', '--runtime'], 131 ['-r', '--runtime'],
127 [ 132 [
128 'vm', 133 'vm',
129 'dart_precompiled', 134 'dart_precompiled',
130 'dart_app', // TODO(rmacnak): Remove after updating bots. 135 'dart_app', // TODO(rmacnak): Remove after updating bots.
131 'd8', 136 'd8',
132 'jsshell', 137 'jsshell',
133 'drt', 138 'drt',
134 'dartium', 139 'dartium',
135 'ff', 140 'ff',
136 'firefox', 141 'firefox',
137 'chrome', 142 'chrome',
138 'safari', 143 'safari',
139 'ie9', 144 'ie9',
140 'ie10', 145 'ie10',
141 'ie11', 146 'ie11',
142 'opera', 147 'opera',
143 'chromeOnAndroid', 148 'chromeOnAndroid',
144 'safarimobilesim', 149 'safarimobilesim',
145 'ContentShellOnAndroid', 150 'ContentShellOnAndroid',
146 'DartiumOnAndroid', 151 'DartiumOnAndroid',
152 'self_check',
147 'none' 153 'none'
148 ], 154 ],
149 'vm'), 155 'vm'),
150 new _TestOptionSpecification( 156 new _TestOptionSpecification(
151 'arch', 157 'arch',
152 'The architecture to run tests for', 158 'The architecture to run tests for',
153 ['-a', '--arch'], 159 ['-a', '--arch'],
154 [ 160 [
155 'all', 161 'all',
156 'ia32', 162 'ia32',
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 ['--packages'], 478 ['--packages'],
473 [], 479 [],
474 null), 480 null),
475 new _TestOptionSpecification( 481 new _TestOptionSpecification(
476 'exclude_suite', 482 'exclude_suite',
477 'Exclude suites from default selector, only works when no' 483 'Exclude suites from default selector, only works when no'
478 ' selector has been specified on the command line', 484 ' selector has been specified on the command line',
479 ['--exclude-suite'], 485 ['--exclude-suite'],
480 defaultTestSelectors, 486 defaultTestSelectors,
481 null), 487 null),
488 new _TestOptionSpecification(
489 'skip-compilation',
490 'Skip the compilation step, using the output from the previous run.',
Bill Hesse 2016/12/06 14:46:03 I don't understand what "using the output from the
asgerf 2016/12/06 15:41:49 I've added some more text. If this flag is a seri
491 ['--skip-compilation'],
492 [],
493 false,
494 type: 'bool')
482 ]; 495 ];
483 } 496 }
484 497
485 /** 498 /**
486 * Parse a list of strings as test options. 499 * Parse a list of strings as test options.
487 * 500 *
488 * Returns a list of configurations in which to run the 501 * Returns a list of configurations in which to run the
489 * tests. Configurations are maps mapping from option keys to 502 * tests. Configurations are maps mapping from option keys to
490 * values. When encountering the first non-option string, the rest 503 * values. When encountering the first non-option string, the rest
491 * of the arguments are stored in the returned Map under the 'rest' 504 * of the arguments are stored in the returned Map under the 'rest'
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 'opera', 703 'opera',
691 'chromeOnAndroid', 704 'chromeOnAndroid',
692 'safarimobilesim' 705 'safarimobilesim'
693 ]; 706 ];
694 break; 707 break;
695 case 'dart2analyzer': 708 case 'dart2analyzer':
696 validRuntimes = const ['none']; 709 validRuntimes = const ['none'];
697 break; 710 break;
698 case 'app_jit': 711 case 'app_jit':
699 case 'dartk': 712 case 'dartk':
700 validRuntimes = const ['vm']; 713 validRuntimes = const ['vm', 'self_check', 'none'];
701 break; 714 break;
702 case 'precompiler': 715 case 'precompiler':
703 case 'dartkp': 716 case 'dartkp':
704 validRuntimes = const ['dart_precompiled']; 717 validRuntimes = const ['dart_precompiled'];
705 break; 718 break;
706 case 'none': 719 case 'none':
707 validRuntimes = const [ 720 validRuntimes = const [
708 'vm', 721 'vm',
709 'drt', 722 'drt',
710 'dartium', 723 'dartium',
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 if (option.keys.contains(name)) { 1009 if (option.keys.contains(name)) {
997 return option; 1010 return option;
998 } 1011 }
999 } 1012 }
1000 print('Unknown test option $name'); 1013 print('Unknown test option $name');
1001 exit(1); 1014 exit(1);
1002 } 1015 }
1003 1016
1004 List<_TestOptionSpecification> _options; 1017 List<_TestOptionSpecification> _options;
1005 } 1018 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698