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

Side by Side Diff: tests/standalone/coverage_test.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/lib/mirrors/library_uri_io_test.dart ('k') | tests/standalone/debugger/debug_lib.dart » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // This test forks a second vm process that runs the script tools/coverage.dart 5 // This test forks a second vm process that runs the script tools/coverage.dart
6 // and verifies that the coverage tool produces its expected output. 6 // and verifies that the coverage tool produces its expected output.
7 // This test is mainly here to ensure that the coverage tool compiles and 7 // This test is mainly here to ensure that the coverage tool compiles and
8 // runs. 8 // runs.
9 9
10 import "dart:async"; 10 import "dart:async";
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 print("Successfully matched all lines of '$targPath'"); 45 print("Successfully matched all lines of '$targPath'");
46 } else { 46 } else {
47 print("Error: could not match all source code lines of '$targPath'"); 47 print("Error: could not match all source code lines of '$targPath'");
48 exit(-1); 48 exit(-1);
49 } 49 }
50 } 50 }
51 51
52 void main() { 52 void main() {
53 // Compute paths for coverage tool and coverage target relative 53 // Compute paths for coverage tool and coverage target relative
54 // the the path of this script. 54 // the the path of this script.
55 var scriptPath = dirname(Platform.script.toFilePath()); 55 var scriptPath = dirname(Platform.script);
56 var toolPath = normalize(join(scriptPath, coverageToolScript)); 56 var toolPath = normalize(join(scriptPath, coverageToolScript));
57 targPath = normalize(join(scriptPath, coverageTargetScript)); 57 targPath = normalize(join(scriptPath, coverageTargetScript));
58 58
59 sourceLines = new File(targPath).readAsLinesSync(); 59 sourceLines = new File(targPath).readAsLinesSync();
60 assert(sourceLines != null); 60 assert(sourceLines != null);
61 61
62 var processOpts = [ "--compile_all", toolPath, targPath ]; 62 var processOpts = [ "--compile_all", toolPath, targPath ];
63 63
64 Process.start(Platform.executable, processOpts).then((Process process) { 64 Process.start(Platform.executable, processOpts).then((Process process) {
65 coverageToolProcess = process; 65 coverageToolProcess = process;
(...skipping 13 matching lines...) Expand all
79 futures.add(subscription.asFuture(true)); 79 futures.add(subscription.asFuture(true));
80 subscription = stderrStringStream.listen(onCoverageOutput); 80 subscription = stderrStringStream.listen(onCoverageOutput);
81 futures.add(subscription.asFuture(true)); 81 futures.add(subscription.asFuture(true));
82 futures.add(coverageToolProcess.exitCode.then(checkExitCode)); 82 futures.add(coverageToolProcess.exitCode.then(checkExitCode));
83 Future.wait(futures).then((results) { 83 Future.wait(futures).then((results) {
84 checkSuccess(); 84 checkSuccess();
85 if (results.contains(false)) exit(-1); 85 if (results.contains(false)) exit(-1);
86 }); 86 });
87 }); 87 });
88 } 88 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/library_uri_io_test.dart ('k') | tests/standalone/debugger/debug_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698