| Index: tools/testing/dart/runtime_configuration.dart
|
| diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
|
| index 33b83e982e3369914da23cb4229c133c42975b3c..367d86cdc0caa707aa01272ea29c4ff86310281b 100644
|
| --- a/tools/testing/dart/runtime_configuration.dart
|
| +++ b/tools/testing/dart/runtime_configuration.dart
|
| @@ -4,6 +4,8 @@
|
|
|
| library runtime_configuration;
|
|
|
| +import 'dart:io' show Directory, File;
|
| +
|
| import 'compiler_configuration.dart' show CommandArtifact;
|
|
|
| // TODO(ahe): Remove this import, we can precompute all the values required
|
| @@ -59,6 +61,9 @@ class RuntimeConfiguration {
|
| case 'drt':
|
| return new DrtRuntimeConfiguration();
|
|
|
| + case 'self_check':
|
| + return new SelfCheckRuntimeConfiguration();
|
| +
|
| default:
|
| throw "Unknown runtime '$runtime'";
|
| }
|
| @@ -82,6 +87,8 @@ class RuntimeConfiguration {
|
| }
|
|
|
| List<String> dart2jsPreambles(Uri preambleDir) => [];
|
| +
|
| + bool get shouldSkipNegativeTests => false;
|
| }
|
|
|
| /// The 'none' runtime configuration.
|
| @@ -287,6 +294,39 @@ class DartPrecompiledAdbRuntimeConfiguration
|
| }
|
| }
|
|
|
| +class SelfCheckRuntimeConfiguration extends DartVmRuntimeConfiguration {
|
| + final List<String> selfCheckers = <String>[];
|
| +
|
| + SelfCheckRuntimeConfiguration() {
|
| + searchForSelfCheckers();
|
| + }
|
| +
|
| + void searchForSelfCheckers() {
|
| + for (var entry in new Directory('pkg').listSync(recursive: true)) {
|
| + if (entry is File && entry.path.endsWith('_self_check.dart')) {
|
| + selfCheckers.add(entry.path);
|
| + }
|
| + }
|
| + }
|
| +
|
| + List<Command> computeRuntimeCommands(
|
| + TestSuite suite,
|
| + CommandBuilder commandBuilder,
|
| + CommandArtifact artifact,
|
| + List<String> arguments,
|
| + Map<String, String> environmentOverrides) {
|
| + String executable = suite.dartVmBinaryFileName;
|
| + return selfCheckers
|
| + .map((String tester) => commandBuilder.getVmBatchCommand(
|
| + executable, tester, arguments, environmentOverrides,
|
| + checked: suite.configuration['checked']))
|
| + .toList();
|
| + }
|
| +
|
| + @override
|
| + bool get shouldSkipNegativeTests => true;
|
| +}
|
| +
|
| /// Temporary runtime configuration for browser runtimes that haven't been
|
| /// migrated yet.
|
| // TODO(ahe): Remove this class.
|
|
|