[flutter_tools] only run web shard if requested (#69932)
diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 7130721..5907e59 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart
@@ -320,7 +320,7 @@ Directory(path.join(toolsPath, kTest)) .listSync() .map<String>((FileSystemEntity entry) => entry.path) - .where((String name) => name.endsWith(kDotShard) && !name.contains('web')) + .where((String name) => name.endsWith(kDotShard)) .map<String>((String name) => path.basenameWithoutExtension(name)), // The `dynamic` on the next line is because Map.fromIterable isn't generic. value: (dynamic subshard) => () async { @@ -337,6 +337,10 @@ ); }, ); + // Prevent web tests from running if not explicitly requested. + if (Platform.environment[CIRRUS_TASK_NAME] == null) { + subshards.remove('web'); + } await selectSubshard(subshards); }