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

Side by Side Diff: pkg/fasta/lib/src/run.dart

Issue 2634453004: Fasta infrastructure. (Closed)
Patch Set: Address review comments. 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 unified diff | Download patch
« no previous file with comments | « pkg/fasta/lib/src/outline.dart ('k') | pkg/fasta/lib/src/target.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // TODO(ahe): Using [TestContext] to compute a value for [dartVm]. Make the
32 // API simpler.
33 await TestContext.create(null, <String, String>{}, constructor);
34 List<String> arguments = <String>["${uri.toFilePath()}"]
35 ..addAll(cl.arguments.skip(1));
36 if (cl.verbose) {
37 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}");
38 }
39 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments);
40 stdout.write(result.output);
41 return result.exitCode;
42 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/outline.dart ('k') | pkg/fasta/lib/src/target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698