| OLD | NEW |
| 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 Platform; | 7 import 'dart:io' show Platform; |
| 8 | 8 |
| 9 import 'runtime_configuration.dart' show RuntimeConfiguration; | 9 import 'runtime_configuration.dart' show RuntimeConfiguration; |
| 10 | 10 |
| 11 import 'test_runner.dart' show Command, CommandBuilder, CompilationCommand; | 11 import 'test_runner.dart' show Command, CommandBuilder, CompilationCommand; |
| 12 | 12 |
| 13 import 'test_suite.dart' show TestInformation, TestUtils; | 13 import 'test_suite.dart' show TestInformation, TestUtils; |
| 14 | 14 |
| 15 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; |
| 16 |
| 15 /// Grouping of a command with its expected result. | 17 /// Grouping of a command with its expected result. |
| 16 class CommandArtifact { | 18 class CommandArtifact { |
| 17 final List<Command> commands; | 19 final List<Command> commands; |
| 18 | 20 |
| 19 /// Expected result of running [command]. | 21 /// Expected result of running [command]. |
| 20 final String filename; | 22 final String filename; |
| 21 | 23 |
| 22 /// MIME type of [filename]. | 24 /// MIME type of [filename]. |
| 23 final String mimeType; | 25 final String mimeType; |
| 24 | 26 |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 List<String> originalArguments, | 730 List<String> originalArguments, |
| 729 CommandArtifact artifact) { | 731 CommandArtifact artifact) { |
| 730 List<String> args = []; | 732 List<String> args = []; |
| 731 if (isChecked) { | 733 if (isChecked) { |
| 732 args.add('--enable_asserts'); | 734 args.add('--enable_asserts'); |
| 733 args.add('--enable_type_checks'); | 735 args.add('--enable_type_checks'); |
| 734 } | 736 } |
| 735 var newOriginalArguments = new List<String>.from(originalArguments); | 737 var newOriginalArguments = new List<String>.from(originalArguments); |
| 736 for (var i = 0; i < newOriginalArguments .length; i++) { | 738 for (var i = 0; i < newOriginalArguments .length; i++) { |
| 737 if (newOriginalArguments[i].endsWith(".dart")) { | 739 if (newOriginalArguments[i].endsWith(".dart")) { |
| 738 newOriginalArguments[i] = "${artifact.filename}/out.aotsnapshot"; | 740 var dir = artifact.filename; |
| 741 if (runtimeConfiguration is DartPrecompiledAdbRuntimeConfiguration) { |
| 742 // On android the precompiled snapshot will be pushed to a different |
| 743 // directory on the device, use that one instead. |
| 744 dir = DartPrecompiledAdbRuntimeConfiguration.DeviceTestDir; |
| 745 } |
| 746 newOriginalArguments[i] = "$dir/out.aotsnapshot"; |
| 739 } | 747 } |
| 740 } | 748 } |
| 741 return args | 749 return args |
| 742 ..addAll(vmOptions) | 750 ..addAll(vmOptions) |
| 743 ..addAll(sharedOptions) | 751 ..addAll(sharedOptions) |
| 744 ..addAll(newOriginalArguments); | 752 ..addAll(newOriginalArguments); |
| 745 } | 753 } |
| 746 } | 754 } |
| 747 | 755 |
| 748 class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { | 756 class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 RuntimeConfiguration runtimeConfiguration, | 897 RuntimeConfiguration runtimeConfiguration, |
| 890 String buildDir, | 898 String buildDir, |
| 891 TestInformation info, | 899 TestInformation info, |
| 892 List<String> vmOptions, | 900 List<String> vmOptions, |
| 893 List<String> sharedOptions, | 901 List<String> sharedOptions, |
| 894 List<String> originalArguments, | 902 List<String> originalArguments, |
| 895 CommandArtifact artifact) { | 903 CommandArtifact artifact) { |
| 896 return <String>[]; | 904 return <String>[]; |
| 897 } | 905 } |
| 898 } | 906 } |
| OLD | NEW |