diff --git a/dev/devicelab/bin/tasks/hello_world_impeller.dart b/dev/devicelab/bin/tasks/hello_world_impeller.dart index d094882fda..8b86c864f7 100644 --- a/dev/devicelab/bin/tasks/hello_world_impeller.dart +++ b/dev/devicelab/bin/tasks/hello_world_impeller.dart @@ -22,24 +22,25 @@ Future run() async { bool isUsingValidationLayers = false; bool hasValidationErrors = false; - int impellerBackendCount = 0; + int invalidBackendCount = 0; final Completer didReceiveBackendMessage = Completer(); await inDirectory(appDir, () async { await flutter('packages', options: ['get']); - + const String validationLayersMessage = 'Using the Impeller rendering backend (Vulkan with Validation Layers)'; final StreamSubscription adb = device.logcat.listen( (String data) { if (data.contains('Using the Impeller rendering backend')) { // Sometimes more than one of these will be printed out if there is a // fallback. + if (!data.contains(validationLayersMessage)) { + invalidBackendCount += 1; + } if (!didReceiveBackendMessage.isCompleted) { didReceiveBackendMessage.complete(); } - impellerBackendCount += 1; } - if (data.contains( - 'Using the Impeller rendering backend (Vulkan with Validation Layers)')) { + if (data.contains(validationLayersMessage)) { isUsingValidationLayers = true; } // "ImpellerValidationBreak" comes from the engine: @@ -68,7 +69,7 @@ Future run() async { await adb.cancel(); }); - if (!isUsingValidationLayers || impellerBackendCount != 1) { + if (!isUsingValidationLayers || invalidBackendCount != 0) { return TaskResult.failure('Not using Vulkan validation layers.'); } if (hasValidationErrors){