Revert "Clean up test infrastructure (#41880)" (#42982)

This reverts commit 1781d5c9bb.
This commit is contained in:
Jonah Williams
2019-10-17 19:47:16 -07:00
committed by GitHub
parent be7937965c
commit 1982a5c3ec
27 changed files with 1777 additions and 1722 deletions

View File

@@ -95,6 +95,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
OutputMode outputMode = OutputMode.print,
CapturedOutput output,
bool skip = false,
bool expectFlaky = false,
bool Function(String) removeLine,
}) async {
assert((outputMode == OutputMode.capture) == (output != null),
@@ -144,6 +145,10 @@ Future<void> runCommand(String executable, List<String> arguments, {
output.stderr = _flattenToString(await savedStderr);
}
// If the test is flaky we don't care about the actual exit.
if (expectFlaky)
return;
if ((exitCode == 0) == expectNonZeroExit || (expectedExitCode != null && exitCode != expectedExitCode)) {
if (failureMessage != null) {
print(failureMessage);