From 5649161bd7fc591e313c12f35fccfe4c8e211dbe Mon Sep 17 00:00:00 2001 From: Victoria Ashworth <15619084+vashworth@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:17:48 -0500 Subject: [PATCH] Revert "fix install checks in flavors devicelab tests" (#133894) Reverts flutter/flutter#133719 `Windows_android flavors_test_win` failed twice in a row in the tree --- dev/devicelab/bin/tasks/flavors_test.dart | 54 +++++++++---------- dev/devicelab/bin/tasks/flavors_test_ios.dart | 51 ++++++++---------- .../bin/tasks/flavors_test_macos.dart | 41 +++++++------- 3 files changed, 65 insertions(+), 81 deletions(-) diff --git a/dev/devicelab/bin/tasks/flavors_test.dart b/dev/devicelab/bin/tasks/flavors_test.dart index aab245b8894e..055f58aa29f7 100644 --- a/dev/devicelab/bin/tasks/flavors_test.dart +++ b/dev/devicelab/bin/tasks/flavors_test.dart @@ -13,37 +13,31 @@ Future main() async { await task(() async { await createFlavorsTest().call(); await createIntegrationTestFlavorsTest().call(); + // test install and uninstall of flavors app + await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async { + await flutter( + 'install', + options: ['--debug', '--flavor', 'paid'], + ); + await flutter( + 'install', + options: ['--debug', '--flavor', 'paid', '--uninstall-only'], + ); + final StringBuffer stderr = StringBuffer(); + await evalFlutter( + 'install', + canFail: true, + stderr: stderr, + options: ['--flavor', 'bogus'], + ); - final TaskResult installTestsResult = await inDirectory( - '${flutterDirectory.path}/dev/integration_tests/flavors', - () async { - await flutter( - 'install', - options: ['--debug', '--flavor', 'paid'], - ); - await flutter( - 'install', - options: ['--debug', '--flavor', 'paid', '--uninstall-only'], - ); + final String stderrString = stderr.toString(); + if (!stderrString.contains('The Xcode project defines schemes: free, paid')) { + print(stderrString); + return TaskResult.failure('Should not succeed with bogus flavor'); + } + }); - final StringBuffer stderr = StringBuffer(); - await evalFlutter( - 'install', - canFail: true, - stderr: stderr, - options: ['--flavor', 'bogus'], - ); - - final String stderrString = stderr.toString(); - if (!stderrString.contains('"build/app/outputs/flutter-apk/app-bogus-release.apk" does not exist.')) { - print(stderrString); - return TaskResult.failure('Should not succeed with bogus flavor'); - } - - return TaskResult.success(null); - }, - ); - - return installTestsResult; + return TaskResult.success(null); }); } diff --git a/dev/devicelab/bin/tasks/flavors_test_ios.dart b/dev/devicelab/bin/tasks/flavors_test_ios.dart index 4e84ed4ec356..2fbfcb9e0a4a 100644 --- a/dev/devicelab/bin/tasks/flavors_test_ios.dart +++ b/dev/devicelab/bin/tasks/flavors_test_ios.dart @@ -14,35 +14,30 @@ Future main() async { await createFlavorsTest().call(); await createIntegrationTestFlavorsTest().call(); // test install and uninstall of flavors app - final TaskResult installTestsResult = await inDirectory( - '${flutterDirectory.path}/dev/integration_tests/flavors', - () async { - await flutter( - 'install', - options: ['--flavor', 'paid'], - ); - await flutter( - 'install', - options: ['--flavor', 'paid', '--uninstall-only'], - ); - final StringBuffer stderr = StringBuffer(); - await evalFlutter( - 'install', - canFail: true, - stderr: stderr, - options: ['--flavor', 'bogus'], - ); + await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async { + await flutter( + 'install', + options: ['--flavor', 'paid'], + ); + await flutter( + 'install', + options: ['--flavor', 'paid', '--uninstall-only'], + ); + final StringBuffer stderr = StringBuffer(); + await evalFlutter( + 'install', + canFail: true, + stderr: stderr, + options: ['--flavor', 'bogus'], + ); - final String stderrString = stderr.toString(); - if (!stderrString.contains('The Xcode project defines schemes: free, paid')) { - print(stderrString); - return TaskResult.failure('Should not succeed with bogus flavor'); - } + final String stderrString = stderr.toString(); + if (!stderrString.contains('install failed, bogus flavor not found')) { + print(stderrString); + return TaskResult.failure('Should not succeed with bogus flavor'); + } + }); - return TaskResult.success(null); - }, - ); - - return installTestsResult; + return TaskResult.success(null); }); } diff --git a/dev/devicelab/bin/tasks/flavors_test_macos.dart b/dev/devicelab/bin/tasks/flavors_test_macos.dart index e3bb56123bc4..346bc31a19c9 100644 --- a/dev/devicelab/bin/tasks/flavors_test_macos.dart +++ b/dev/devicelab/bin/tasks/flavors_test_macos.dart @@ -14,31 +14,26 @@ Future main() async { await createFlavorsTest().call(); await createIntegrationTestFlavorsTest().call(); - final TaskResult installTestsResult = await inDirectory( - '${flutterDirectory.path}/dev/integration_tests/flavors', - () async { - final StringBuffer stderr = StringBuffer(); + await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async { + final StringBuffer stderr = StringBuffer(); - await evalFlutter( - 'install', - canFail: true, - stderr: stderr, - options: [ - '--d', 'macos', - '--flavor', 'free' - ], - ); + await evalFlutter( + 'install', + canFail: true, + stderr: stderr, + options: [ + '--d', 'macos', + '--flavor', 'free' + ], + ); - final String stderrString = stderr.toString(); - if (!stderrString.contains('Host and target are the same. Nothing to install.')) { - print(stderrString); - return TaskResult.failure('Installing a macOS app on macOS should no-op'); - } + final String stderrString = stderr.toString(); + if (!stderrString.contains('Host and target are the same. Nothing to install.')) { + print(stderrString); + return TaskResult.failure('Installing a macOS app on macOS should no-op'); + } + }); - return TaskResult.success(null); - }, - ); - - return installTestsResult; + return TaskResult.success(null); }); }