Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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.md file. | |
| 4 | |
| 5 library fasta.run; | |
| 6 | |
| 7 import 'dart:async' show | |
| 8 Future; | |
| 9 | |
| 10 import 'dart:io' show | |
| 11 stdout; | |
| 12 | |
| 13 import 'package:testing/testing.dart' show | |
| 14 StdioProcess; | |
| 15 | |
| 16 import '../testing/kernel_chain.dart' show | |
| 17 TestContext; | |
| 18 | |
| 19 import 'compiler_command_line.dart' show | |
| 20 CompilerCommandLine; | |
| 21 | |
| 22 Future<int> run(Uri uri, CompilerCommandLine cl) async { | |
| 23 Uri dartVm; | |
| 24 | |
| 25 Future<TestContext> constructor( | |
| 26 suite, Map<String, String> environment, String sdk, Uri vm, | |
| 27 Uri packages, bool strongMode, dartSdk, bool updateExpectations) { | |
| 28 dartVm = vm; | |
| 29 return null; | |
| 30 } | |
| 31 await TestContext.create(null, <String, String>{}, constructor); | |
|
Johnni Winther
2017/01/16 09:47:46
Add comment that this is to fetch the [dartVm] val
ahe
2017/01/16 12:07:04
Done.
| |
| 32 List<String> arguments = <String>["${uri.toFilePath()}"] | |
| 33 ..addAll(cl.arguments.skip(1)); | |
| 34 if (cl.verbose) { | |
| 35 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}"); | |
| 36 } | |
| 37 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments); | |
| 38 stdout.write(result.output); | |
| 39 return result.exitCode; | |
| 40 } | |
| OLD | NEW |