mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 12:47:14 +00:00
[infra] Avoid crash in test_runner.dart --help
`testConfigurations` expects at least one configuration, so avoid
calling it when there are no configurations.
This fixes the unhandled exception with `test_runner.dart --help`:
```
No build targets found.
Unhandled exception:
RangeError (index): Invalid value: Valid value range is empty: 0
<asynchronous suspension>
```
With this commit, `--help` just prints "No build targets found" and
exits with 0.
This crash was previously fixed in
02a0396f74
.
Change-Id: Id82c83f66871c4e811a7502f1e831a0592db2065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257580
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
This commit is contained in:
parent
6546d85c50
commit
293b6379b8
|
@ -44,6 +44,10 @@ void main(List<String> arguments) async {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
if (configurations.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Run all of the configured tests.
|
||||
await testConfigurations(configurations);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue