Allow plugins to use compileSdkPreview (#131901)

Fixes https://github.com/flutter/flutter/issues/124748

Based (heavily) off https://github.com/flutter/flutter/pull/104662
This commit is contained in:
Gray Mackall
2023-12-12 12:06:04 -08:00
committed by GitHub
parent eb0890c9da
commit 9a72e1c699
7 changed files with 209 additions and 99 deletions

View File

@@ -253,6 +253,7 @@ Future<void> main(List<String> args) async {
// web_tool_tests is also used by HHH: https://dart.googlesource.com/recipes/+/refs/heads/master/recipes/dart/flutter_engine.py
'web_tool_tests': _runWebToolTests,
'tool_integration_tests': _runIntegrationToolTests,
'android_preview_tool_integration_tests': _runAndroidPreviewIntegrationToolTests,
'tool_host_cross_arch_tests': _runToolHostCrossArchTests,
// All the unit/widget tests run using `flutter test --platform=chrome --web-renderer=html`
'web_tests': _runWebHtmlUnitTests,
@@ -477,6 +478,20 @@ Future<void> _runIntegrationToolTests() async {
);
}
Future<void> _runAndroidPreviewIntegrationToolTests() async {
final List<String> allTests = Directory(path.join(_toolsPath, 'test', 'android_preview_integration.shard'))
.listSync(recursive: true).whereType<File>()
.map<String>((FileSystemEntity entry) => path.relative(entry.path, from: _toolsPath))
.toList();
await _runDartTest(
_toolsPath,
forceSingleCore: true,
testPaths: _selectIndexOfTotalSubshard<String>(allTests),
collectMetrics: true,
);
}
Future<void> _runToolTests() async {
await selectSubshard(<String, ShardRunner>{
'general': _runGeneralToolTests,