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

Unified Diff: tests/standalone/io/http_client_stays_alive_test.dart

Issue 1746743002: Use checked-in .package file for building and testing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status fixes Created 4 years, 3 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 | « tests/standalone/io/code_collection_test.dart ('k') | tests/standalone/io/platform_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_client_stays_alive_test.dart
diff --git a/tests/standalone/io/http_client_stays_alive_test.dart b/tests/standalone/io/http_client_stays_alive_test.dart
index 64ced6e16352c93fe813a937d9624a722ebdb2fe..735566740fe21b7fb09fa4e89287210accb356fa 100644
--- a/tests/standalone/io/http_client_stays_alive_test.dart
+++ b/tests/standalone/io/http_client_stays_alive_test.dart
@@ -11,12 +11,22 @@ import "package:async_helper/async_helper.dart";
//
// The main script spawns a server and a subprocess which does a connection back
// to it.
-// The subprocess is expected to shut down it's idle sockets after
+// The subprocess is expected to shut down its idle sockets after
// [HttpClient.idleTimeout] and the main script will assert that this happens
// within +/- 2 <= seconds.
const SECONDS = 4;
+List<String> packageOptions() {
+ if (Platform.packageRoot != null) {
+ return <String>['--package-root=${Platform.packageRoot}'];
+ } else if (Platform.packageConfig != null) {
+ return <String>['--packages=${Platform.packageConfig}'];
+ } else {
+ return <String>[];
+ }
+}
+
void runServerProcess() {
asyncStart();
HttpServer.bind('127.0.0.1', 0).then((server) {
@@ -29,9 +39,7 @@ void runServerProcess() {
});
var sw = new Stopwatch()..start();
- var arguments = ['--package-root=${Platform.packageRoot}',
- '${Platform.script}',
- url];
+ var arguments = packageOptions()..add(Platform.script.toString())..add(url);
Process.run(Platform.executable, arguments).then((res) {
subscription.cancel();
if (res.exitCode != 0) {
« no previous file with comments | « tests/standalone/io/code_collection_test.dart ('k') | tests/standalone/io/platform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698