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

Side by Side Diff: pkg/front_end/test/fasta/bootstrap_test.dart

Issue 2740323002: Shell script to ease running fasta tools. (Closed)
Patch Set: Update testing.json. Created 3 years, 9 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/front_end/lib/src/fasta/README.md ('k') | pkg/front_end/test/fasta/testing.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async' show Future; 5 import 'dart:async' show Future;
6 6
7 import 'dart:io' show Directory, File, Platform; 7 import 'dart:io' show Directory, File, Platform;
8 8
9 import 'dart:isolate' show Isolate; 9 import 'dart:isolate' show Isolate;
10 10
11 import 'package:async_helper/async_helper.dart' show asyncEnd, asyncStart; 11 import 'package:async_helper/async_helper.dart' show asyncEnd, asyncStart;
12 12
13 import 'package:front_end/src/fasta/testing/kernel_chain.dart' 13 import 'package:front_end/src/fasta/testing/kernel_chain.dart'
14 show computePatchedSdk; 14 show computePatchedSdk;
15 15
16 import 'package:testing/testing.dart' show StdioProcess; 16 import 'package:testing/testing.dart' show StdioProcess;
17 17
18 import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder; 18 import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
19 19
20 import 'package:kernel/ast.dart' show Program; 20 import 'package:kernel/ast.dart' show Program;
21 21
22 import 'package:kernel/text/ast_to_text.dart' show programToString; 22 import 'package:kernel/text/ast_to_text.dart' show programToString;
23 23
24 Future main() async { 24 Future main() async {
25 asyncStart(); 25 asyncStart();
26 Uri sourceCompiler = 26 Uri sourceCompiler =
27 Uri.base.resolve("pkg/front_end/tool/fasta/compile.dart"); 27 Uri.base.resolve("pkg/front_end/tool/_fasta/compile.dart");
28 Uri outline = Uri.base.resolve("pkg/front_end/tool/fasta/outline.dart"); 28 Uri outline = Uri.base.resolve("pkg/front_end/tool/_fasta/outline.dart");
29 Uri packages = await Isolate.packageConfig; 29 Uri packages = await Isolate.packageConfig;
30 Directory tmp = await Directory.systemTemp.createTemp("fasta_bootstrap"); 30 Directory tmp = await Directory.systemTemp.createTemp("fasta_bootstrap");
31 Uri compiledOnceOutput = tmp.uri.resolve("fasta1.dill"); 31 Uri compiledOnceOutput = tmp.uri.resolve("fasta1.dill");
32 Uri compiledTwiceOutput = tmp.uri.resolve("fasta2.dill"); 32 Uri compiledTwiceOutput = tmp.uri.resolve("fasta2.dill");
33 Uri outlineOutput = tmp.uri.resolve("outline.dill"); 33 Uri outlineOutput = tmp.uri.resolve("outline.dill");
34 try { 34 try {
35 await runCompiler(sourceCompiler, sourceCompiler, compiledOnceOutput); 35 await runCompiler(sourceCompiler, sourceCompiler, compiledOnceOutput);
36 await runCompiler(compiledOnceOutput, sourceCompiler, compiledTwiceOutput); 36 await runCompiler(compiledOnceOutput, sourceCompiler, compiledTwiceOutput);
37 await compare(compiledOnceOutput, compiledTwiceOutput); 37 await compare(compiledOnceOutput, compiledTwiceOutput);
38 await runCompiler(compiledTwiceOutput, outline, outlineOutput); 38 await runCompiler(compiledTwiceOutput, outline, outlineOutput);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 class ComparisonFailed { 108 class ComparisonFailed {
109 final Uri a; 109 final Uri a;
110 final Uri b; 110 final Uri b;
111 111
112 ComparisonFailed(this.a, this.b); 112 ComparisonFailed(this.a, this.b);
113 113
114 toString() => "Error: $a is different from $b"; 114 toString() => "Error: $a is different from $b";
115 } 115 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/README.md ('k') | pkg/front_end/test/fasta/testing.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698