From 4fcb4814dda3d53293a15ba6952a688cbb66c0ba Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 14 Aug 2020 10:08:43 -0700 Subject: [PATCH 1/2] Make sure ios tests fail if they fail --- testing/ios/IosUnitTests/run_tests.sh | 7 ++----- testing/run_tests.py | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) 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..d6427e631e7ee 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -370,7 +370,6 @@ 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') command = [ @@ -379,8 +378,7 @@ def RunObjcTests(ios_variant='ios_debug_sim_unopt'): '-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) From d35a0587a377a0f90f43a9d506f9663a8b4bfce6 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 14 Aug 2020 10:10:58 -0700 Subject: [PATCH 2/2] explain --- testing/run_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testing/run_tests.py b/testing/run_tests.py index d6427e631e7ee..002fb6e0fb6c1 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -372,6 +372,10 @@ def RunObjcTests(ios_variant='ios_debug_sim_unopt'): 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 '