Use package config in more test runner config

Change-Id: I7ac7c619be321c8e63d6b95537d68f7b8617da0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244046
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This commit is contained in:
Nate Bosch 2022-05-11 08:58:04 +00:00 committed by Commit Bot
parent 0baa3c1e62
commit c54ade0cce

View file

@ -613,7 +613,10 @@ has been specified on the command line.''',
var value = data[name];
if (data[name] == option.defaultValue ||
(name == 'packages' &&
value == Repository.uri.resolve('.packages').toFilePath())) {
value ==
Repository.uri
.resolve('.dart_tool/package_config.json')
.toFilePath())) {
continue;
}
@ -634,8 +637,9 @@ has been specified on the command line.''',
// Only one value in the configuration map is mutable:
if (selectors.containsKey('observatory_ui')) {
if (selectors.length == 1) {
configuration['packages'] =
Repository.uri.resolve('.packages').toFilePath();
configuration['packages'] = Repository.uri
.resolve('.dart_tool/package_config.json')
.toFilePath();
} else {
// Make a new configuration whose selectors map only contains
// observatory_ui, and remove observatory_ui from the original
@ -648,8 +652,9 @@ has been specified on the command line.''',
selectors.remove('observatory_ui');
// Set the packages flag.
observatoryConfiguration['packages'] =
Repository.uri.resolve('.packages').toFilePath();
observatoryConfiguration['packages'] = Repository.uri
.resolve('.dart_tool/package_config.json')
.toFilePath();
return [
..._expandConfigurations(configuration, selectors),