From 416b43faaad68c94a509a8c172761efaed37e76c Mon Sep 17 00:00:00 2001 From: William Hesse Date: Mon, 17 Jul 2023 19:11:00 +0000 Subject: [PATCH] [infra] Fix handling of deflaking a list of tests An error was introduced by https://dart-review.googlesource.com/c/sdk/+/313567 when the --default-suites flag is used along with a list of tests to deflake. The suites in the list of tests should be the only suites used as selectors, and should replace any other input selectors. Bug: b/290617138 Change-Id: Ic43c1409df621bbaf852276fbaa16ce4961a9549 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314061 Auto-Submit: William Hesse Commit-Queue: Alexander Markov Commit-Queue: William Hesse Reviewed-by: Alexander Markov --- pkg/test_runner/lib/src/options.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart index 59d1ff85afe..bb619c10946 100644 --- a/pkg/test_runner/lib/src/options.dart +++ b/pkg/test_runner/lib/src/options.dart @@ -850,8 +850,10 @@ has been specified on the command line.''') var suitePath = Path(configuration['suite-dir'] as String); selectors.add(suitePath.filename); } else if (configuration['test-list-contents'] != null) { - selectors.addAll((configuration['test-list-contents'] as List) - .map((t) => t.split('/').first)); + selectors = (configuration['test-list-contents'] as List) + .map((t) => t.split('/').first) + .toSet() + .toList(); } else { if (nnbdMode == NnbdMode.legacy) { selectors.addAll(_legacyTestSelectors);