From c54ade0cce1ac192c0964b1c0b547acc00012d4f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 11 May 2022 08:58:04 +0000 Subject: [PATCH] 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 Reviewed-by: Michael Thomsen Commit-Queue: Michael Thomsen --- pkg/test_runner/lib/src/options.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart index d0a67e175a8..89d461b8ab3 100644 --- a/pkg/test_runner/lib/src/options.dart +++ b/pkg/test_runner/lib/src/options.dart @@ -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),