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

Side by Side Diff: utils/testrunner/run_pipeline.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « utils/testrunner/options.dart ('k') | utils/tests/archive/reader_test.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** The default pipeline code for running a test file. */ 5 /** The default pipeline code for running a test file. */
6 library pipeline; 6 library pipeline;
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:math';
10 part 'pipeline_utils.dart'; 9 part 'pipeline_utils.dart';
11 10
12 /** 11 /**
13 * The configuration passed in to the pipeline runner; this essentially 12 * The configuration passed in to the pipeline runner; this essentially
14 * contains all the command line arguments passded to testrunner plus some 13 * contains all the command line arguments passded to testrunner plus some
15 * synthesized ones. 14 * synthesized ones.
16 */ 15 */
17 Map config; 16 Map config;
18 17
19 /** Paths to the various generated temporary files. */ 18 /** Paths to the various generated temporary files. */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Set the root to be the directory containing the test file. 76 // Set the root to be the directory containing the test file.
78 serverRoot = getDirectory(config["testfile"]); 77 serverRoot = getDirectory(config["testfile"]);
79 } 78 }
80 79
81 if (config["port"] == null) { 80 if (config["port"] == null) {
82 // In this case we have to choose a random port and we need 81 // In this case we have to choose a random port and we need
83 // to see if the server starts successfully on that port. 82 // to see if the server starts successfully on that port.
84 var r = new Random(); 83 var r = new Random();
85 tryStartHTTPServer(r, MAX_SERVER_TRIES); 84 tryStartHTTPServer(r, MAX_SERVER_TRIES);
86 } else { 85 } else {
87 serverPort = parseInt(config["port"]); 86 serverPort = int.parse(config["port"]);
88 // Start the HTTP server. 87 // Start the HTTP server.
89 serverId = startProcess(config["dart"], 88 serverId = startProcess(config["dart"],
90 [ serverPath, '--port=$serverPort', '--root=$serverRoot']); 89 [ serverPath, '--port=$serverPort', '--root=$serverRoot']);
91 } 90 }
92 } 91 }
93 } 92 }
94 wrapStage(); 93 wrapStage();
95 } 94 }
96 95
97 void tryStartHTTPServer(Random r, int remainingAttempts) { 96 void tryStartHTTPServer(Random r, int remainingAttempts) {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 348
350 if (!config["keep-files"]) { // Remove the temporary files. 349 if (!config["keep-files"]) { // Remove the temporary files.
351 cleanup(tempDartFile); 350 cleanup(tempDartFile);
352 cleanup(tempHtmlFile); 351 cleanup(tempHtmlFile);
353 cleanup(tempJsFile); 352 cleanup(tempJsFile);
354 cleanup(tempChildDartFile); 353 cleanup(tempChildDartFile);
355 cleanup(tempChildJsFile); 354 cleanup(tempChildJsFile);
356 } 355 }
357 completePipeline(exitcode); 356 completePipeline(exitcode);
358 } 357 }
OLDNEW
« no previous file with comments | « utils/testrunner/options.dart ('k') | utils/tests/archive/reader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698