From 6c19c23fb97163ce2e5c74633ed16ae476a64805 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Sat, 9 Dec 2023 03:19:40 +0100 Subject: [PATCH 1/2] add more info about running tests on iOS --- testing/ios/IosUnitTests/README.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/testing/ios/IosUnitTests/README.md b/testing/ios/IosUnitTests/README.md index 557fb6e29b154..5e15d15b777da 100644 --- a/testing/ios/IosUnitTests/README.md +++ b/testing/ios/IosUnitTests/README.md @@ -1,16 +1,39 @@ # iOS Unit Tests -These are the unit tests for iOS engine. They can be executed locally and are +These are the unit tests for iOS engine. They can be executed locally and are also run in LUCI builds. -## Running Tests +## Running Tests from command line -To build and run the iOS tests, run the following script from the src directory: +To build and run the iOS tests, use the `run_tests` script from the `src` directory. ```sh flutter/testing/run_tests.py --type=objc ``` +And if you're on Apple Silicon: + +```sh +./flutter/testing/run_tests.py \ + --type=objc \ + --variant=host_debug_unopt_arm64 \ + --ios=ios_debug_sim_unopt_arm64 +``` + +The `.xcresult` is automatically removed after testing ends. To change this: + +```sh +export FLUTTER_TEST_OUTPUTS_DIR=~/Desktop +``` + +To learn more: + +``` +flutter/testing/run_tests.py --help +``` + +## Running Tests from Xcode + After the `ios_test_flutter` target is built you can also run the tests inside of Xcode with `testing/ios/IosUnitTests/IosUnitTests.xcodeproj`. From 23815cfc6ee94c40c41d9cca87bb9084010296e8 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 18 Dec 2023 11:18:30 +0100 Subject: [PATCH 2/2] Update testing/ios/IosUnitTests/README.md Co-authored-by: Jenn Magder --- testing/ios/IosUnitTests/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/ios/IosUnitTests/README.md b/testing/ios/IosUnitTests/README.md index 5e15d15b777da..0f40aea9b82f3 100644 --- a/testing/ios/IosUnitTests/README.md +++ b/testing/ios/IosUnitTests/README.md @@ -16,8 +16,7 @@ And if you're on Apple Silicon: ```sh ./flutter/testing/run_tests.py \ --type=objc \ - --variant=host_debug_unopt_arm64 \ - --ios=ios_debug_sim_unopt_arm64 + --ios-variant ios_debug_sim_unopt_arm64 ``` The `.xcresult` is automatically removed after testing ends. To change this: