| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library test.timing; | 5 library test.timing; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 | 10 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 */ | 189 */ |
| 190 Future oneTimeSetUp() { | 190 Future oneTimeSetUp() { |
| 191 initializeInttestMixin(); | 191 initializeInttestMixin(); |
| 192 server = new Server(); | 192 server = new Server(); |
| 193 sourceDirectory = Directory.systemTemp.createTempSync('analysisServer'); | 193 sourceDirectory = Directory.systemTemp.createTempSync('analysisServer'); |
| 194 Completer serverConnected = new Completer(); | 194 Completer serverConnected = new Completer(); |
| 195 onServerConnected.listen((_) { | 195 onServerConnected.listen((_) { |
| 196 serverConnected.complete(); | 196 serverConnected.complete(); |
| 197 }); | 197 }); |
| 198 skipShutdown = true; | 198 skipShutdown = true; |
| 199 return server.start(profileServer: true).then((params) { | 199 return server.start(/*profileServer: true*/).then((params) { |
| 200 server.listenToOutput(dispatchNotification); | 200 server.listenToOutput(dispatchNotification); |
| 201 server.exitCode.then((_) { | 201 server.exitCode.then((_) { |
| 202 skipShutdown = true; | 202 skipShutdown = true; |
| 203 }); | 203 }); |
| 204 return serverConnected.future; | 204 return serverConnected.future; |
| 205 }); | 205 }); |
| 206 } | 206 } |
| 207 | 207 |
| 208 /** | 208 /** |
| 209 * Perform any operations that need to be performed once after all iterations. | 209 * Perform any operations that need to be performed once after all iterations. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 return new Future.value(); | 310 return new Future.value(); |
| 311 } | 311 } |
| 312 // Give the server a short time to comply with the shutdown request; if it | 312 // Give the server a short time to comply with the shutdown request; if it |
| 313 // doesn't exit, then forcibly terminate it. | 313 // doesn't exit, then forcibly terminate it. |
| 314 sendServerShutdown(); | 314 sendServerShutdown(); |
| 315 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () { | 315 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () { |
| 316 return server.kill(); | 316 return server.kill(); |
| 317 }); | 317 }); |
| 318 } | 318 } |
| 319 } | 319 } |
| OLD | NEW |