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

Unified Diff: sdk/lib/_internal/pub/test/serve/utils.dart

Issue 1126403002: pub: don't start the admin server if no --admin-port flag was given. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests Created 5 years, 7 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 | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/serve/utils.dart
diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart
index f84eb9a353f97c13dc97df922401882306a2451d..be87afc46d2acd87adf66c56bfbafd8963bf2fbb 100644
--- a/sdk/lib/_internal/pub/test/serve/utils.dart
+++ b/sdk/lib/_internal/pub/test/serve/utils.dart
@@ -155,6 +155,7 @@ ScheduledProcess startPubServe({Iterable<String> args,
"serve",
"--port=0", // Use port 0 to get an ephemeral port.
"--force-poll",
+ "--admin-port=0", // Use port 0 to get an ephemeral port.
"--log-admin-url"
];
@@ -223,6 +224,7 @@ final _parsePortRegExp = new RegExp(r"([^ ]+) +on http://localhost:(\d+)");
/// Parses the port number from the "Running admin server on localhost:1234"
/// line printed by pub serve.
bool _parseAdminPort(String line) {
+ expect(line, startsWith('Running admin server on'));
var match = _parsePortRegExp.firstMatch(line);
if (match == null) return false;
_adminPort = int.parse(match[2]);
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698