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

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

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Adjusted the status of two tests and the logic of one test, to make them work with --enable-asserts Created 3 years, 7 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
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 false, 211 false,
212 type: 'bool'), 212 type: 'bool'),
213 new _TestOptionSpecification( 213 new _TestOptionSpecification(
214 'fast_startup', 214 'fast_startup',
215 'Pass the --fast-startup flag to dart2js', 215 'Pass the --fast-startup flag to dart2js',
216 ['--fast-startup'], 216 ['--fast-startup'],
217 [], 217 [],
218 false, 218 false,
219 type: 'bool'), 219 type: 'bool'),
220 new _TestOptionSpecification( 220 new _TestOptionSpecification(
221 'enable_asserts',
222 'Pass the --enable-asserts flag to dart2js',
sra1 2017/05/19 16:51:35 This should be made to work for VM tests too.
eernst 2017/05/23 17:09:55 Done.
223 ['--enable-asserts'],
224 [],
225 false,
226 type: 'bool'),
227 new _TestOptionSpecification(
221 'dart2js_with_kernel', 228 'dart2js_with_kernel',
222 'Enable the internal pipeline in dart2js to use kernel', 229 'Enable the internal pipeline in dart2js to use kernel',
223 ['--dart2js-with-kernel'], 230 ['--dart2js-with-kernel'],
224 [], 231 [],
225 false, 232 false,
226 type: 'bool'), 233 type: 'bool'),
227 new _TestOptionSpecification('hot_reload', 'Run hot reload stress tests', 234 new _TestOptionSpecification('hot_reload', 'Run hot reload stress tests',
228 ['--hot-reload'], [], false, 235 ['--hot-reload'], [], false,
229 type: 'bool'), 236 type: 'bool'),
230 new _TestOptionSpecification( 237 new _TestOptionSpecification(
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 if (configuration['verbose'] && configuration['progress'] != 'buildbot') { 785 if (configuration['verbose'] && configuration['progress'] != 'buildbot') {
779 configuration['progress'] = 'verbose'; 786 configuration['progress'] = 'verbose';
780 } 787 }
781 788
782 // Create the artificial negative options that test status files 789 // Create the artificial negative options that test status files
783 // expect. 790 // expect.
784 configuration['unchecked'] = !configuration['checked']; 791 configuration['unchecked'] = !configuration['checked'];
785 configuration['host_unchecked'] = !configuration['host_checked']; 792 configuration['host_unchecked'] = !configuration['host_checked'];
786 configuration['unminified'] = !configuration['minified']; 793 configuration['unminified'] = !configuration['minified'];
787 configuration['nocsp'] = !configuration['csp']; 794 configuration['nocsp'] = !configuration['csp'];
795 configuration['no_enable_asserts'] = !configuration['enable_asserts'];
788 796
789 String runtime = configuration['runtime']; 797 String runtime = configuration['runtime'];
790 if (runtime == 'firefox') { 798 if (runtime == 'firefox') {
791 configuration['runtime'] == 'ff'; 799 configuration['runtime'] == 'ff';
792 } 800 }
793 801
794 String compiler = configuration['compiler']; 802 String compiler = configuration['compiler'];
795 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); 803 configuration['browser'] = TestUtils.isBrowserRuntime(runtime);
796 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler); 804 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler);
797 805
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 return option; 1011 return option;
1004 } 1012 }
1005 } 1013 }
1006 print('Unknown test option $name'); 1014 print('Unknown test option $name');
1007 exit(1); 1015 exit(1);
1008 return null; // Unreachable. 1016 return null; // Unreachable.
1009 } 1017 }
1010 1018
1011 List<_TestOptionSpecification> _options; 1019 List<_TestOptionSpecification> _options;
1012 } 1020 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698