diff --git a/dev/bots/suite_runners/run_android_engine_tests.dart b/dev/bots/suite_runners/run_android_engine_tests.dart index 6ad399b9a3..ca18c5f21a 100644 --- a/dev/bots/suite_runners/run_android_engine_tests.dart +++ b/dev/bots/suite_runners/run_android_engine_tests.dart @@ -57,7 +57,7 @@ Future runAndroidEngineTests({required ImpellerBackend impellerBackend}) a // TODO(matanlurey): Enable once `flutter drive` retains error logs. // final RegExp impellerStdoutPattern = RegExp('Using the Imepller rendering backend (.*)'); - for (final FileSystemEntity file in mains) { + Future runTest(FileSystemEntity file) async { final CommandResult result = await runCommand( 'flutter', [ @@ -77,7 +77,7 @@ Future runAndroidEngineTests({required ImpellerBackend impellerBackend}) a final String? stdout = result.flattenedStdout; if (stdout == null) { foundError(['No stdout produced.']); - continue; + return; } // TODO(matanlurey): Enable once `flutter drive` retains error logs. @@ -86,7 +86,7 @@ Future runAndroidEngineTests({required ImpellerBackend impellerBackend}) a // final Match? stdoutMatch = impellerStdoutPattern.firstMatch(stdout); // if (stdoutMatch == null) { // foundError(['Could not find pattern ${impellerStdoutPattern.pattern}.', stdout]); - // continue; + // return; // } // final String reportedBackend = stdoutMatch.group(1)!.toLowerCase(); @@ -94,15 +94,43 @@ Future runAndroidEngineTests({required ImpellerBackend impellerBackend}) a // foundError([ // 'Reported Imepller backend was $reportedBackend, expected ${impellerBackend.name}', // ]); - // continue; + // return; // } } + + for (final FileSystemEntity file in mains) { + if (file.path.contains('hcpp')) { + continue; + } + await runTest(file); + } + + // Test HCPP Platform Views on Vulkan. + if (impellerBackend == ImpellerBackend.vulkan) { + androidManifestXml.writeAsStringSync( + androidManifestXml.readAsStringSync().replaceFirst( + kSurfaceControlMetadataDisabled, + kSurfaceControlMetadataEnabled, + ), + ); + for (final FileSystemEntity file in mains) { + if (!file.path.contains('hcpp')) { + continue; + } + await runTest(file); + } + } } finally { // Restore original contents. androidManifestXml.writeAsStringSync(androidManifestContents); } } +const String kSurfaceControlMetadataDisabled = + ''; +const String kSurfaceControlMetadataEnabled = + ''; + String _impellerBackendMetadata({required String value}) { return ''; } diff --git a/dev/integration_tests/android_engine_test/android/app/src/main/AndroidManifest.xml b/dev/integration_tests/android_engine_test/android/app/src/main/AndroidManifest.xml index 882488091f..aaef79fc82 100644 --- a/dev/integration_tests/android_engine_test/android/app/src/main/AndroidManifest.xml +++ b/dev/integration_tests/android_engine_test/android/app/src/main/AndroidManifest.xml @@ -21,12 +21,12 @@ found in the LICENSE file. --> while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> - - + + +