-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[flutter_plugin_tools] Make firebase-test-lab fail when no tests run #4172
[flutter_plugin_tools] Make firebase-test-lab fail when no tests run #4172
Conversation
If a package supports Android, it will now report failure instead of skip if no tests run. This matches the new behavior of `drive-examples`, and is intended to prevent recurrance of situations where we are silently failing to run tests because of, e.g., tests being in the wrong directory.
@@ -110,31 +109,34 @@ class FirebaseTestLabCommand extends PackageLoopingCommand { | |||
print(''); | |||
if (exitCode == 0) { | |||
print('Firebase project configured.'); | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix for the bug, but the Completer
was needlessly complex so I cleaned it up as well.
This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled. |
contains('No androidTest directory found.'), | ||
contains('The following packages had errors:'), | ||
contains('plugin:\n' | ||
' No tests ran (use --exclude if this is intentional).'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: does it make sense to say where --exclude
should be used? e.g. in .cirrus.yml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be useful locally as well; in any scenario where someone sees this message, they are trying to run a failing package, so might want to exclude it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…lutter#4172) If a package supports Android, it will now report failure instead of skip if no tests run. This matches the new behavior of drive-examples, and is intended to prevent recurrance of situations where we are silently failing to run tests because of, e.g., tests being in the wrong directory. Also fixes a long-standing but unnoticed problem where if a run tried to run more than one package's tests, it would hang forever (although on the bots it doesn't seem to time out, just end logs abruptly) due to a logic error in the call to configure gcloud. Fixes flutter/flutter#86732
…lutter#4172) If a package supports Android, it will now report failure instead of skip if no tests run. This matches the new behavior of drive-examples, and is intended to prevent recurrance of situations where we are silently failing to run tests because of, e.g., tests being in the wrong directory. Also fixes a long-standing but unnoticed problem where if a run tried to run more than one package's tests, it would hang forever (although on the bots it doesn't seem to time out, just end logs abruptly) due to a logic error in the call to configure gcloud. Fixes flutter/flutter#86732
If a package supports Android, it will now report failure instead of
skip if no tests run. This matches the new behavior of
drive-examples
,and is intended to prevent recurrance of situations where we are
silently failing to run tests because of, e.g., tests being in the wrong
directory.
Also fixes a long-standing but unnoticed problem where if a
run tried to run more than one package's tests, it would hang
forever (although on the bots it doesn't seem to time out, just
end logs abruptly) due to a logic error in the call to configure
gcloud.
Fixes flutter/flutter#86732
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).