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);