Files
sdk/pkg/testing/lib/dart_vm_suite.dart
T
Peter von der Ahé b2d7397a0c Add testing chain to validate messages.yaml
Change-Id: I34bf0a4bbbd9dab1133a69c844033035b7edb8db
Reviewed-on: https://dart-review.googlesource.com/43969
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-02-28 11:02:23 +00:00

31 lines
904 B
Dart

// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
library testing.dart_vm_suite;
import 'testing.dart';
Future<ChainContext> createContext(
Chain suite, Map<String, String> environment) async {
return new VmContext();
}
class VmContext extends ChainContext {
final List<Step> steps = const <Step>[const DartVmStep()];
}
class DartVmStep extends Step<FileBasedTestDescription, int, VmContext> {
const DartVmStep();
String get name => "Dart VM";
Future<Result<int>> run(
FileBasedTestDescription input, VmContext context) async {
StdioProcess process = await StdioProcess.run("dart", [input.file.path]);
return process.toResult();
}
}
main(List<String> arguments) => runMe(arguments, createContext);