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

Unified Diff: lib/src/runner.dart

Issue 1258363003: Expose the Observatory URL when debugging. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/backend/test_platform.dart ('k') | lib/src/runner/browser/browser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner.dart
diff --git a/lib/src/runner.dart b/lib/src/runner.dart
index 0ca8e67e99191c4c2cb9f0f3ef78c34c7b2d912e..d0fa34450ef4e70b1446ed1178236487a1baa0f6 100644
--- a/lib/src/runner.dart
+++ b/lib/src/runner.dart
@@ -27,7 +27,7 @@ import 'utils.dart';
/// The set of platforms for which debug flags are (currently) not supported.
final _debugUnsupportedPlatforms = new Set.from(
- [TestPlatform.vm, TestPlatform.phantomJS, TestPlatform.contentShell]);
+ [TestPlatform.vm, TestPlatform.phantomJS]);
/// A class that loads and runs tests based on a [Configuration].
///
@@ -231,17 +231,39 @@ class Runner {
_reporter.pause();
var bold = _configuration.color ? '\u001b[1m' : '';
+ var yellow = _configuration.color ? '\u001b[33m' : '';
var noColor = _configuration.color ? '\u001b[0m' : '';
print('');
- print(wordWrap(
- "${bold}The test runner is paused.${noColor} Open the dev console in "
- "${suite.platform} and set breakpoints. Once you're finished, "
- "return to this terminal and press Enter."));
- await race([
+ if (suite.platform.isDartVM) {
+ var url = suite.environment.observatoryUrl;
+ if (url == null) {
+ print("${yellow}Observatory URL not found. Make sure you're using "
+ "${suite.platform.name} 1.11 or later.$noColor");
+ } else {
+ print("Observatory URL: $bold$url$noColor");
+ }
+ }
+
+ var buffer = new StringBuffer(
+ "${bold}The test runner is paused.${noColor} ");
+ if (!suite.platform.isHeadless) {
+ buffer.write("Open the dev console in ${suite.platform} ");
+ if (suite.platform.isDartVM) buffer.write("or ");
+ } else {
+ buffer.write("Open ");
+ }
+ if (suite.platform.isDartVM) buffer.write("the Observatory ");
+
+ buffer.write("and set breakpoints. Once you're finished, return to this "
+ "terminal and press Enter.");
+
+ print(wordWrap(buffer.toString()));
+
+ await inCompletionOrder([
suite.environment.displayPause(),
cancelableNext(stdinLines)
- ]);
+ ]).first;
} finally {
_reporter.resume();
}
« no previous file with comments | « lib/src/backend/test_platform.dart ('k') | lib/src/runner/browser/browser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698