From 61a61a863202c08c04fa48179874951e5de76840 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Tue, 19 Dec 2023 23:54:54 +0100 Subject: [PATCH] [Docs] Add more info about running tests on iOS (flutter/engine#48859) I wish this info was there, that'd save me from looking inside the script. --- .../testing/ios/IosUnitTests/README.md | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/testing/ios/IosUnitTests/README.md b/engine/src/flutter/testing/ios/IosUnitTests/README.md index 557fb6e29b..0f40aea9b8 100644 --- a/engine/src/flutter/testing/ios/IosUnitTests/README.md +++ b/engine/src/flutter/testing/ios/IosUnitTests/README.md @@ -1,16 +1,38 @@ # 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 \ + --ios-variant 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`.