OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:async/async.dart'; | 7 import 'package:async/async.dart'; |
8 | 8 |
9 import '../backend/test_platform.dart'; | |
10 import '../util/io.dart'; | 9 import '../util/io.dart'; |
11 import '../utils.dart'; | 10 import '../utils.dart'; |
12 import 'configuration.dart'; | 11 import 'configuration.dart'; |
13 import 'console.dart'; | 12 import 'console.dart'; |
14 import 'engine.dart'; | 13 import 'engine.dart'; |
15 import 'load_suite.dart'; | 14 import 'load_suite.dart'; |
16 import 'reporter.dart'; | 15 import 'reporter.dart'; |
17 import 'runner_suite.dart'; | 16 import 'runner_suite.dart'; |
18 | 17 |
19 /// Runs [loadSuite] in debugging mode. | 18 /// Runs [loadSuite] in debugging mode. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 await _engine.onIdle.first; | 102 await _engine.onIdle.first; |
104 } finally { | 103 } finally { |
105 close(); | 104 close(); |
106 } | 105 } |
107 } | 106 } |
108 | 107 |
109 /// Prints URLs for the [_suite]'s debugger and waits for the user to tell the | 108 /// Prints URLs for the [_suite]'s debugger and waits for the user to tell the |
110 /// suite to run. | 109 /// suite to run. |
111 Future _pause() async { | 110 Future _pause() async { |
112 if (_suite.platform == null) return; | 111 if (_suite.platform == null) return; |
113 if (_suite.platform == TestPlatform.vm) return; | 112 if (!_suite.environment.supportsDebugging) return; |
114 | 113 |
115 try { | 114 try { |
116 _reporter.pause(); | 115 _reporter.pause(); |
117 | 116 |
118 var bold = _config.color ? '\u001b[1m' : ''; | 117 var bold = _config.color ? '\u001b[1m' : ''; |
119 var yellow = _config.color ? '\u001b[33m' : ''; | 118 var yellow = _config.color ? '\u001b[33m' : ''; |
120 var noColor = _config.color ? '\u001b[0m' : ''; | 119 var noColor = _config.color ? '\u001b[0m' : ''; |
121 print(''); | 120 print(''); |
122 | 121 |
123 if (_suite.platform.isDartVM) { | 122 if (_suite.platform.isDartVM) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 'Will restart "${liveTest.test.name}" once it finishes running.')); | 187 'Will restart "${liveTest.test.name}" once it finishes running.')); |
189 } | 188 } |
190 | 189 |
191 /// Closes the debugger and releases its resources. | 190 /// Closes the debugger and releases its resources. |
192 void close() { | 191 void close() { |
193 _closed = true; | 192 _closed = true; |
194 _onDebuggingSubscription.cancel(); | 193 _onDebuggingSubscription.cancel(); |
195 _console.stop(); | 194 _console.stop(); |
196 } | 195 } |
197 } | 196 } |
OLD | NEW |