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

Unified Diff: tools/testing/dart/compiler_configuration.dart

Issue 2641433002: Support tests using VMOptions also with kernel (Closed)
Patch Set: More fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/language_kernel.status ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index ee38396974a0003105ffe8fc9443383c2253aba6..bb10b16bbd189d451efecab70553ae4fed2dcaab 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -267,6 +267,33 @@ class DartKCompilerConfiguration extends CompilerConfiguration {
CommandBuilder.instance, arguments, environmentOverrides)
], '$tempDir/out.dill', 'application/dart');
}
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ List<String> args = [];
+ if (isChecked) {
+ args.add('--enable_asserts');
+ args.add('--enable_type_checks');
+ }
+
+ var newOriginalArguments = new List<String>.from(originalArguments);
+ for (var i = 0; i < newOriginalArguments .length; i++) {
+ if (newOriginalArguments[i].endsWith(".dart")) {
+ newOriginalArguments[i] = artifact.filename;
+ }
+ }
+
+ return args
+ ..addAll(vmOptions)
+ ..addAll(sharedOptions)
+ ..addAll(newOriginalArguments);
+ }
}
typedef List<String> CompilerArgumentsFunction(
@@ -304,7 +331,7 @@ class PipelineCommand {
return new PipelineCommand._(conf, (List<String> globalArguments,
String previousOutput) {
assert(previousOutput.endsWith('.dill'));
- return [previousOutput];
+ return []..addAll(globalArguments)..add(previousOutput);
});
}
@@ -354,7 +381,7 @@ class ComposedCompilerConfiguration extends CompilerConfiguration {
List<String> computeCompilerArguments(vmOptions, sharedOptions, args) {
// The result will be passed as an input to [extractArguments]
// (i.e. the arguments to the [PipelineCommand]).
- return new List<String>.from(sharedOptions)..addAll(args);
+ return <String>[]..addAll(vmOptions)..addAll(sharedOptions)..addAll(args);
}
List<String> computeRuntimeArguments(
« no previous file with comments | « tests/language/language_kernel.status ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698