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

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

Issue 1671013002: Add '--abort-on-assertion-errors' to test runner's dart2js commands. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 compiler_configuration; 5 library compiler_configuration;
6 6
7 import 'dart:io' show 7 import 'dart:io' show
8 Platform; 8 Platform;
9 9
10 import 'runtime_configuration.dart' show 10 import 'runtime_configuration.dart' show
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 CompilationCommand computeCompilationCommand( 208 CompilationCommand computeCompilationCommand(
209 String outputFileName, 209 String outputFileName,
210 String buildDir, 210 String buildDir,
211 CommandBuilder commandBuilder, 211 CommandBuilder commandBuilder,
212 List arguments, 212 List arguments,
213 Map<String, String> environmentOverrides) { 213 Map<String, String> environmentOverrides) {
214 arguments = new List.from(arguments); 214 arguments = new List.from(arguments);
215 arguments.add('--out=$outputFileName'); 215 arguments.add('--out=$outputFileName');
216 216
217 // We want all dart2js compilers to run the vm with the
218 // --abort-on-assertion-errors flag.
219 // We have allowed constant maps as environmentOverrides,
220 // so we modify a new map.
221 var newOverrides = {'DART_VM_OPTIONS': '--abort-on-assertion-errors'};
222 if (environmentOverrides != null) {
223 newOverrides.addAll(environmentOverrides);
224 if (environmentOverrides.containsKey('DART_VM_OPTIONS')) {
225 newOverrides['DART_VM_OPTIONS'] += ' --abort-on-assertion-errors';
226 }
227 }
kustermann 2016/02/08 11:11:42 Does this also work when using dart2js in batch mo
Bill Hesse 2016/02/08 11:16:09 Yes it does. That is how I found this function -
217 return commandBuilder.getCompilationCommand( 228 return commandBuilder.getCompilationCommand(
218 moniker, outputFileName, !useSdk, 229 moniker, outputFileName, !useSdk,
219 bootstrapDependencies(buildDir), 230 bootstrapDependencies(buildDir),
220 computeCompilerPath(buildDir), 231 computeCompilerPath(buildDir),
221 arguments, environmentOverrides); 232 arguments, newOverrides);
222 } 233 }
223 234
224 List<Uri> bootstrapDependencies(String buildDir) { 235 List<Uri> bootstrapDependencies(String buildDir) {
225 if (!useSdk) return const <Uri>[]; 236 if (!useSdk) return const <Uri>[];
226 return _bootstrapDependenciesCache.putIfAbsent(buildDir, () => 237 return _bootstrapDependenciesCache.putIfAbsent(buildDir, () =>
227 [Uri.base.resolveUri(nativeDirectoryToUri(buildDir)) 238 [Uri.base.resolveUri(nativeDirectoryToUri(buildDir))
228 .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')]); 239 .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')]);
229 } 240 }
230 } 241 }
231 242
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 RuntimeConfiguration runtimeConfiguration, 450 RuntimeConfiguration runtimeConfiguration,
440 String buildDir, 451 String buildDir,
441 TestInformation info, 452 TestInformation info,
442 List<String> vmOptions, 453 List<String> vmOptions,
443 List<String> sharedOptions, 454 List<String> sharedOptions,
444 List<String> originalArguments, 455 List<String> originalArguments,
445 CommandArtifact artifact) { 456 CommandArtifact artifact) {
446 return <String>[]; 457 return <String>[];
447 } 458 }
448 } 459 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698