From b883d96bd7e2702d9c2b8b5053c79ccbccdac650 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 7 Jun 2022 12:04:56 -0700 Subject: [PATCH 1/4] Run iOS drive tests on Apple Silicon --- .cirrus.yml | 33 +++++++++++-- script/tool/CHANGELOG.md | 1 + script/tool/lib/src/common/core.dart | 3 ++ .../tool/lib/src/drive_examples_command.dart | 6 +++ .../test/drive_examples_command_test.dart | 47 +++++++++++++++++++ 5 files changed, 87 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 699ec264db77..ae2f7a1f7f0a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -314,6 +314,35 @@ task: CHANNEL: "master" CHANNEL: "stable" << : *BUILD_ALL_PLUGINS_APP_TEMPLATE + - name: ios-platform_tests + env: + PATH: $PATH:/usr/local/bin + # TODO(jmagman): Run on stable when --enable-software-rendering + # is available https://github.com/flutter/flutter/pull/105161. + CHANNEL: "master" + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot + build_script: + - ./script/tool_runner.sh build-examples --ios + xcode_analyze_script: + - ./script/tool_runner.sh xcode-analyze --ios + xcode_analyze_deprecation_script: + # Ensure we don't accidentally introduce deprecated code. + - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 + native_test_script: + - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" + drive_script: + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering ### macOS desktop tasks ### - name: macos-platform_tests env: @@ -353,14 +382,12 @@ task: - name: ios-platform_tests env: PATH: $PATH:/usr/local/bin + CHANNEL: "stable" matrix: PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "stable" SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] create_simulator_script: - xcrun simctl list diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md index adc7bfcd29ae..e8434d4fdae1 100644 --- a/script/tool/CHANGELOG.md +++ b/script/tool/CHANGELOG.md @@ -1,6 +1,7 @@ ## NEXT - Supports empty custom analysis allow list files. +- Adds `drive-examples ---enable-software-rendering` flag. ## 0.8.6 diff --git a/script/tool/lib/src/common/core.dart b/script/tool/lib/src/common/core.dart index b91029f1a5c8..1d96bf375227 100644 --- a/script/tool/lib/src/common/core.dart +++ b/script/tool/lib/src/common/core.dart @@ -30,6 +30,9 @@ const String platformWindows = 'windows'; /// Key for enable experiment. const String kEnableExperiment = 'enable-experiment'; +/// Key for enable software rendering. +const String kEnableSoftwareRendering = 'enable-software-rendering'; + /// Target platforms supported by Flutter. // ignore: public_member_api_docs enum FlutterPlatform { android, ios, linux, macos, web, windows } diff --git a/script/tool/lib/src/drive_examples_command.dart b/script/tool/lib/src/drive_examples_command.dart index 15366e17ae85..a5383690be1f 100644 --- a/script/tool/lib/src/drive_examples_command.dart +++ b/script/tool/lib/src/drive_examples_command.dart @@ -43,6 +43,10 @@ class DriveExamplesCommand extends PackageLoopingCommand { help: 'Runs the driver tests in Dart VM with the given experiments enabled.', ); + argParser.addFlag( + kEnableSoftwareRendering, + help: 'Renders the driver tests using the Skia software backend.', + ); } @override @@ -337,6 +341,8 @@ class DriveExamplesCommand extends PackageLoopingCommand { ...deviceFlags, if (enableExperiment.isNotEmpty) '--enable-experiment=$enableExperiment', + if (getBoolArg(kEnableSoftwareRendering)) + '--enable-software-rendering', '--driver', getRelativePosixPath(driver, from: example.directory), '--target', diff --git a/script/tool/test/drive_examples_command_test.dart b/script/tool/test/drive_examples_command_test.dart index 23318f7cd604..1ca830e0dde6 100644 --- a/script/tool/test/drive_examples_command_test.dart +++ b/script/tool/test/drive_examples_command_test.dart @@ -898,6 +898,53 @@ void main() { ])); }); + test('enable-software-rendering flag', () async { + final RepositoryPackage plugin = createFakePlugin( + 'plugin', + packagesDir, + extraFiles: [ + 'example/test_driver/plugin_test.dart', + 'example/test_driver/plugin.dart', + 'example/ios/ios.m', + ], + platformSupport: { + platformIOS: const PlatformDetails(PlatformSupport.inline), + }, + ); + + final Directory pluginExampleDirectory = getExampleDir(plugin); + + setMockFlutterDevicesOutput(); + await runCapturingPrint(runner, [ + 'drive-examples', + '--ios', + '--enable-software-rendering', + ]); + + expect( + processRunner.recordedCalls, + orderedEquals( + [ + ProcessCall(getFlutterCommand(mockPlatform), const ['devices', '--machine'], null), + ProcessCall( + getFlutterCommand(mockPlatform), + const [ + 'drive', + '-d', + _fakeIOSDevice, + '--enable-software-rendering', + '--driver', + 'test_driver/plugin_test.dart', + '--target', + 'test_driver/plugin.dart' + ], + pluginExampleDirectory.path, + ), + ], + ), + ); + }); + test('fails when no example is present', () async { createFakePlugin( 'plugin', From 92fa36b2dc73550a639c8d70dd043ed6e1cf6613 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 7 Jun 2022 12:15:51 -0700 Subject: [PATCH 2/4] template --- .cirrus.yml | 81 ++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ae2f7a1f7f0a..dd803f18fcfa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -51,6 +51,33 @@ build_all_plugins_app_template: &BUILD_ALL_PLUGINS_APP_TEMPLATE - cd all_plugins - flutter build $BUILD_ALL_ARGS --release +ios_platform_tests_template: &IOS_PLATFORM_TESTS_TEMPLATE + env: + PATH: $PATH:/usr/local/bin + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 $SIMULATOR_RUNTIME | xargs xcrun simctl boot + build_script: + - ./script/tool_runner.sh build-examples --ios + xcode_analyze_script: + - ./script/tool_runner.sh xcode-analyze --ios + xcode_analyze_deprecation_script: + # Ensure we don't accidentally introduce deprecated code. + - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 + native_test_script: + - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" + drive_script: + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering + macos_template: &MACOS_TEMPLATE # Only one macOS task can run in parallel without credits, so use them for # PRs on macOS. @@ -316,33 +343,11 @@ task: << : *BUILD_ALL_PLUGINS_APP_TEMPLATE - name: ios-platform_tests env: - PATH: $PATH:/usr/local/bin # TODO(jmagman): Run on stable when --enable-software-rendering # is available https://github.com/flutter/flutter/pull/105161. CHANNEL: "master" - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot - build_script: - - ./script/tool_runner.sh build-examples --ios - xcode_analyze_script: - - ./script/tool_runner.sh xcode-analyze --ios - xcode_analyze_deprecation_script: - # Ensure we don't accidentally introduce deprecated code. - - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 - native_test_script: - - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" - drive_script: - # `drive-examples` contains integration tests, which changes the UI of the application. - # This UI change sometimes affects `xctest`. - # So we run `drive-examples` after `native-test`; changing the order will result ci failure. - - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering + SIMULATOR_RUNTIME: com.apple.CoreSimulator.SimRuntime.iOS-15-5 + << : *IOS_PLATFORM_TESTS_TEMPLATE ### macOS desktop tasks ### - name: macos-platform_tests env: @@ -381,31 +386,11 @@ task: # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: ios-platform_tests env: - PATH: $PATH:/usr/local/bin + # TODO(jmagman): Move to MACOS_ARM_TEMPLATE when --enable-software-rendering + # is available https://github.com/flutter/flutter/pull/105161. CHANNEL: "stable" - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot - build_script: - - ./script/tool_runner.sh build-examples --ios - xcode_analyze_script: - - ./script/tool_runner.sh xcode-analyze --ios - xcode_analyze_deprecation_script: - # Ensure we don't accidentally introduce deprecated code. - - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 - native_test_script: - - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" - drive_script: - # `drive-examples` contains integration tests, which changes the UI of the application. - # This UI change sometimes affects `xctest`. - # So we run `drive-examples` after `native-test`; changing the order will result ci failure. - - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml + SIMULATOR_RUNTIME: com.apple.CoreSimulator.SimRuntime.iOS-15-0 + << : *IOS_PLATFORM_TESTS_TEMPLATE ### macOS desktop tasks ### # macos-platform_tests builds all the plugins on M1, so this build is run # on Intel to give us build coverage of both host types. From c55dde6065c1b8f74e436822f93089669116e57c Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 7 Jun 2022 12:19:30 -0700 Subject: [PATCH 3/4] Duplicate --- .cirrus.yml | 81 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index dd803f18fcfa..8a9907f54129 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -51,33 +51,6 @@ build_all_plugins_app_template: &BUILD_ALL_PLUGINS_APP_TEMPLATE - cd all_plugins - flutter build $BUILD_ALL_ARGS --release -ios_platform_tests_template: &IOS_PLATFORM_TESTS_TEMPLATE - env: - PATH: $PATH:/usr/local/bin - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 $SIMULATOR_RUNTIME | xargs xcrun simctl boot - build_script: - - ./script/tool_runner.sh build-examples --ios - xcode_analyze_script: - - ./script/tool_runner.sh xcode-analyze --ios - xcode_analyze_deprecation_script: - # Ensure we don't accidentally introduce deprecated code. - - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 - native_test_script: - - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" - drive_script: - # `drive-examples` contains integration tests, which changes the UI of the application. - # This UI change sometimes affects `xctest`. - # So we run `drive-examples` after `native-test`; changing the order will result ci failure. - - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering - macos_template: &MACOS_TEMPLATE # Only one macOS task can run in parallel without credits, so use them for # PRs on macOS. @@ -343,11 +316,33 @@ task: << : *BUILD_ALL_PLUGINS_APP_TEMPLATE - name: ios-platform_tests env: + PATH: $PATH:/usr/local/bin # TODO(jmagman): Run on stable when --enable-software-rendering # is available https://github.com/flutter/flutter/pull/105161. CHANNEL: "master" - SIMULATOR_RUNTIME: com.apple.CoreSimulator.SimRuntime.iOS-15-5 - << : *IOS_PLATFORM_TESTS_TEMPLATE + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-5 | xargs xcrun simctl boot + build_script: + - ./script/tool_runner.sh build-examples --ios + xcode_analyze_script: + - ./script/tool_runner.sh xcode-analyze --ios + xcode_analyze_deprecation_script: + # Ensure we don't accidentally introduce deprecated code. + - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 + native_test_script: + - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" + drive_script: + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering ### macOS desktop tasks ### - name: macos-platform_tests env: @@ -386,11 +381,31 @@ task: # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: ios-platform_tests env: - # TODO(jmagman): Move to MACOS_ARM_TEMPLATE when --enable-software-rendering - # is available https://github.com/flutter/flutter/pull/105161. + PATH: $PATH:/usr/local/bin CHANNEL: "stable" - SIMULATOR_RUNTIME: com.apple.CoreSimulator.SimRuntime.iOS-15-0 - << : *IOS_PLATFORM_TESTS_TEMPLATE + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot + build_script: + - ./script/tool_runner.sh build-examples --ios + xcode_analyze_script: + - ./script/tool_runner.sh xcode-analyze --ios + xcode_analyze_deprecation_script: + # Ensure we don't accidentally introduce deprecated code. + - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 + native_test_script: + - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" + drive_script: + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml ### macOS desktop tasks ### # macos-platform_tests builds all the plugins on M1, so this build is run # on Intel to give us build coverage of both host types. From f52df34848f1b6f16dafdb89ccc552fbd40514bd Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 7 Jun 2022 17:11:53 -0700 Subject: [PATCH 4/4] Revert software rendering, try FramebufferRendererHint --- .cirrus.yml | 43 ++++------------- script/tool/CHANGELOG.md | 1 - script/tool/lib/src/common/core.dart | 3 -- .../tool/lib/src/drive_examples_command.dart | 6 --- .../test/drive_examples_command_test.dart | 47 ------------------- 5 files changed, 8 insertions(+), 92 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8a9907f54129..450dd682032b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -314,19 +314,23 @@ task: CHANNEL: "master" CHANNEL: "stable" << : *BUILD_ALL_PLUGINS_APP_TEMPLATE + ### iOS tasks ### - name: ios-platform_tests env: PATH: $PATH:/usr/local/bin - # TODO(jmagman): Run on stable when --enable-software-rendering - # is available https://github.com/flutter/flutter/pull/105161. - CHANNEL: "master" matrix: PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "stable" SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] create_simulator_script: + # TODO(jmagman): Remove default write when Metal on virtualization is on the ARM infrastructure. + # See discussion at https://github.com/flutter/plugins/pull/5794#issuecomment-1134716307. + - defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint 3 - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-5 | xargs xcrun simctl boot build_script: @@ -342,7 +346,7 @@ task: # `drive-examples` contains integration tests, which changes the UI of the application. # This UI change sometimes affects `xctest`. # So we run `drive-examples` after `native-test`; changing the order will result ci failure. - - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml --enable-software-rendering + - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml ### macOS desktop tasks ### - name: macos-platform_tests env: @@ -375,37 +379,6 @@ task: - name: darwin-lint_podspecs script: - ./script/tool_runner.sh podspecs - ### iOS tasks ### - # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator - # tests are reliable on the ARM infrastructure. See discussion at - # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - - name: ios-platform_tests - env: - PATH: $PATH:/usr/local/bin - CHANNEL: "stable" - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot - build_script: - - ./script/tool_runner.sh build-examples --ios - xcode_analyze_script: - - ./script/tool_runner.sh xcode-analyze --ios - xcode_analyze_deprecation_script: - # Ensure we don't accidentally introduce deprecated code. - - ./script/tool_runner.sh xcode-analyze --ios --ios-min-version=13.0 - native_test_script: - - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" - drive_script: - # `drive-examples` contains integration tests, which changes the UI of the application. - # This UI change sometimes affects `xctest`. - # So we run `drive-examples` after `native-test`; changing the order will result ci failure. - - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml ### macOS desktop tasks ### # macos-platform_tests builds all the plugins on M1, so this build is run # on Intel to give us build coverage of both host types. diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md index e8434d4fdae1..adc7bfcd29ae 100644 --- a/script/tool/CHANGELOG.md +++ b/script/tool/CHANGELOG.md @@ -1,7 +1,6 @@ ## NEXT - Supports empty custom analysis allow list files. -- Adds `drive-examples ---enable-software-rendering` flag. ## 0.8.6 diff --git a/script/tool/lib/src/common/core.dart b/script/tool/lib/src/common/core.dart index 1d96bf375227..b91029f1a5c8 100644 --- a/script/tool/lib/src/common/core.dart +++ b/script/tool/lib/src/common/core.dart @@ -30,9 +30,6 @@ const String platformWindows = 'windows'; /// Key for enable experiment. const String kEnableExperiment = 'enable-experiment'; -/// Key for enable software rendering. -const String kEnableSoftwareRendering = 'enable-software-rendering'; - /// Target platforms supported by Flutter. // ignore: public_member_api_docs enum FlutterPlatform { android, ios, linux, macos, web, windows } diff --git a/script/tool/lib/src/drive_examples_command.dart b/script/tool/lib/src/drive_examples_command.dart index a5383690be1f..15366e17ae85 100644 --- a/script/tool/lib/src/drive_examples_command.dart +++ b/script/tool/lib/src/drive_examples_command.dart @@ -43,10 +43,6 @@ class DriveExamplesCommand extends PackageLoopingCommand { help: 'Runs the driver tests in Dart VM with the given experiments enabled.', ); - argParser.addFlag( - kEnableSoftwareRendering, - help: 'Renders the driver tests using the Skia software backend.', - ); } @override @@ -341,8 +337,6 @@ class DriveExamplesCommand extends PackageLoopingCommand { ...deviceFlags, if (enableExperiment.isNotEmpty) '--enable-experiment=$enableExperiment', - if (getBoolArg(kEnableSoftwareRendering)) - '--enable-software-rendering', '--driver', getRelativePosixPath(driver, from: example.directory), '--target', diff --git a/script/tool/test/drive_examples_command_test.dart b/script/tool/test/drive_examples_command_test.dart index 1ca830e0dde6..23318f7cd604 100644 --- a/script/tool/test/drive_examples_command_test.dart +++ b/script/tool/test/drive_examples_command_test.dart @@ -898,53 +898,6 @@ void main() { ])); }); - test('enable-software-rendering flag', () async { - final RepositoryPackage plugin = createFakePlugin( - 'plugin', - packagesDir, - extraFiles: [ - 'example/test_driver/plugin_test.dart', - 'example/test_driver/plugin.dart', - 'example/ios/ios.m', - ], - platformSupport: { - platformIOS: const PlatformDetails(PlatformSupport.inline), - }, - ); - - final Directory pluginExampleDirectory = getExampleDir(plugin); - - setMockFlutterDevicesOutput(); - await runCapturingPrint(runner, [ - 'drive-examples', - '--ios', - '--enable-software-rendering', - ]); - - expect( - processRunner.recordedCalls, - orderedEquals( - [ - ProcessCall(getFlutterCommand(mockPlatform), const ['devices', '--machine'], null), - ProcessCall( - getFlutterCommand(mockPlatform), - const [ - 'drive', - '-d', - _fakeIOSDevice, - '--enable-software-rendering', - '--driver', - 'test_driver/plugin_test.dart', - '--target', - 'test_driver/plugin.dart' - ], - pluginExampleDirectory.path, - ), - ], - ), - ); - }); - test('fails when no example is present', () async { createFakePlugin( 'plugin',