Quiet debug test runner output when in machine mode. (#11228)

* Quiet debug test runner output when in machine mode.

See: https://github.com/flutter/flutter-intellij/issues/1176

* json => machine
This commit is contained in:
Phil Quitslund
2017-07-14 11:20:50 -07:00
committed by GitHub
parent 547708b327
commit 05562d5734
3 changed files with 9 additions and 4 deletions

View File

@@ -209,7 +209,7 @@ class TestCommand extends FlutterCommand {
enableObservatory: collector != null || startPaused,
startPaused: startPaused,
ipv6: argResults['ipv6'],
json: machine,
machine: machine,
);
if (collector != null) {

View File

@@ -54,6 +54,7 @@ void installHook({
@required String shellPath,
TestWatcher watcher,
bool enableObservatory: false,
bool machine: false,
bool startPaused: false,
int observatoryPort,
int diagnosticPort,
@@ -66,6 +67,7 @@ void installHook({
() => new _FlutterPlatform(
shellPath: shellPath,
watcher: watcher,
machine: machine,
enableObservatory: enableObservatory,
startPaused: startPaused,
explicitObservatoryPort: observatoryPort,
@@ -84,6 +86,7 @@ class _FlutterPlatform extends PlatformPlugin {
@required this.shellPath,
this.watcher,
this.enableObservatory,
this.machine,
this.startPaused,
this.explicitObservatoryPort,
this.explicitDiagnosticPort,
@@ -95,6 +98,7 @@ class _FlutterPlatform extends PlatformPlugin {
final String shellPath;
final TestWatcher watcher;
final bool enableObservatory;
final bool machine;
final bool startPaused;
final int explicitObservatoryPort;
final int explicitDiagnosticPort;
@@ -230,7 +234,7 @@ class _FlutterPlatform extends PlatformPlugin {
assert(processObservatoryUri == null);
assert(explicitObservatoryPort == null ||
explicitObservatoryPort == detectedUri.port);
if (startPaused) {
if (startPaused && !machine) {
printStatus('The test process has been started.');
printStatus('You can now connect to it using observatory. To connect, load the following Web site in your browser:');
printStatus(' $detectedUri');

View File

@@ -26,7 +26,7 @@ Future<int> runTests(
bool enableObservatory: false,
bool startPaused: false,
bool ipv6: false,
bool json: false,
bool machine: false,
TestWatcher watcher,
}) async {
// Compute the command-line arguments for package:test.
@@ -39,7 +39,7 @@ Future<int> runTests(
testArgs.add('--concurrency=1');
}
if (json) {
if (machine) {
testArgs.addAll(<String>['-r', 'json']);
}
@@ -66,6 +66,7 @@ Future<int> runTests(
shellPath: shellPath,
watcher: watcher,
enableObservatory: enableObservatory,
machine: machine,
startPaused: startPaused,
serverType: serverType,
);