diff --git a/testing/ios/IosUnitTests/run_tests.sh b/testing/ios/IosUnitTests/run_tests.sh index 6c44de0aef00f..a06335283ac17 100755 --- a/testing/ios/IosUnitTests/run_tests.sh +++ b/testing/ios/IosUnitTests/run_tests.sh @@ -8,9 +8,6 @@ if [ $# -eq 1 ]; then FLUTTER_ENGINE=$1 fi -set -o pipefail && xcodebuild -sdk iphonesimulator \ - -scheme IosUnitTests \ - -destination 'platform=iOS Simulator,name=iPhone 8' \ - test \ - FLUTTER_ENGINE=$FLUTTER_ENGINE +../../run_tests.py --variant $FLUTTER_ENGINE --type objc --ios-variant $FLUTTER_ENGINE + popd diff --git a/testing/run_tests.py b/testing/run_tests.py index b692cd3b9eaf0..002fb6e0fb6c1 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -370,17 +370,19 @@ def RunObjcTests(ios_variant='ios_debug_sim_unopt'): ios_out_dir = os.path.join(out_dir, ios_variant) EnsureIosTestsAreBuilt(ios_out_dir) - pretty = "cat" if subprocess.call(["which", "xcpretty"]) else "xcpretty" ios_unit_test_dir = os.path.join(buildroot_dir, 'flutter', 'testing', 'ios', 'IosUnitTests') + # Avoid using xcpretty unless the following can be addressed: + # - Make sure all relevant failure output is printed on a failure. + # - Make sure that a failing exit code is set for CI. + # See https://github.com/flutter/flutter/issues/63742 command = [ 'xcodebuild ' '-sdk iphonesimulator ' '-scheme IosUnitTests ' "-destination platform='iOS Simulator,name=iPhone 8' " 'test ' - 'FLUTTER_ENGINE=' + ios_variant + - ' | ' + pretty + 'FLUTTER_ENGINE=' + ios_variant ] RunCmd(command, cwd=ios_unit_test_dir, shell=True)