| OLD | NEW |
| 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 import "dart:io"; |
| 6 import "dart:async"; |
| 7 |
| 8 import "package:async_helper/async_helper.dart"; |
| 5 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
| 6 import "package:path/path.dart"; | 10 import "package:path/path.dart"; |
| 7 import "dart:io"; | |
| 8 import "dart:isolate"; | |
| 9 import "dart:async"; | |
| 10 | 11 |
| 11 void main() { | 12 void main() { |
| 12 var args = new Options().arguments; | 13 var args = new Options().arguments; |
| 13 if (!args.contains('--child')) { | 14 if (!args.contains('--child')) { |
| 14 runAllTestsInChildProcesses(); | 15 runAllTestsInChildProcesses(); |
| 15 } else { | 16 } else { |
| 16 InitializeSSL(useDatabase: args.contains('--database'), | 17 InitializeSSL(useDatabase: args.contains('--database'), |
| 17 useBuiltinRoots: args.contains('--builtin-roots')); | 18 useBuiltinRoots: args.contains('--builtin-roots')); |
| 18 testGoogleUrl(args.contains('--builtin-roots')); | 19 testGoogleUrl(args.contains('--builtin-roots')); |
| 19 } | 20 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 print("Client failed"); | 74 print("Client failed"); |
| 74 print(" stdout:"); | 75 print(" stdout:"); |
| 75 print(result.stdout); | 76 print(result.stdout); |
| 76 print(" stderr:"); | 77 print(" stderr:"); |
| 77 print(result.stderr); | 78 print(result.stderr); |
| 78 Expect.fail('Client subprocess exit code: ${result.exitCode}'); | 79 Expect.fail('Client subprocess exit code: ${result.exitCode}'); |
| 79 } | 80 } |
| 80 }); | 81 }); |
| 81 } | 82 } |
| 82 | 83 |
| 83 ReceivePort keepAlive = new ReceivePort(); | 84 asyncStart(); |
| 84 Future.wait([runChild(['--child']), | 85 Future.wait([runChild(['--child']), |
| 85 runChild(['--child', '--database']), | 86 runChild(['--child', '--database']), |
| 86 runChild(['--child', '--builtin-roots']), | 87 runChild(['--child', '--builtin-roots']), |
| 87 runChild(['--child', '--builtin-roots', '--database'])]) | 88 runChild(['--child', '--builtin-roots', '--database'])]) |
| 88 .then((_) => keepAlive.close()); | 89 .then((_) => asyncEnd()); |
| 89 } | 90 } |
| OLD | NEW |