Skip to content

Commit b32a2a5

Browse files
authored
Make sure ios tests fail if they fail (flutter#20518)
* Make sure ios tests fail if they fail * explain
1 parent 7b1ee9f commit b32a2a5

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

testing/ios/IosUnitTests/run_tests.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ if [ $# -eq 1 ]; then
88
FLUTTER_ENGINE=$1
99
fi
1010

11-
set -o pipefail && xcodebuild -sdk iphonesimulator \
12-
-scheme IosUnitTests \
13-
-destination 'platform=iOS Simulator,name=iPhone 8' \
14-
test \
15-
FLUTTER_ENGINE=$FLUTTER_ENGINE
11+
../../run_tests.py --variant $FLUTTER_ENGINE --type objc --ios-variant $FLUTTER_ENGINE
12+
1613
popd

testing/run_tests.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,19 @@ def RunObjcTests(ios_variant='ios_debug_sim_unopt'):
370370
ios_out_dir = os.path.join(out_dir, ios_variant)
371371
EnsureIosTestsAreBuilt(ios_out_dir)
372372

373-
pretty = "cat" if subprocess.call(["which", "xcpretty"]) else "xcpretty"
374373
ios_unit_test_dir = os.path.join(buildroot_dir, 'flutter', 'testing', 'ios', 'IosUnitTests')
375374

375+
# Avoid using xcpretty unless the following can be addressed:
376+
# - Make sure all relevant failure output is printed on a failure.
377+
# - Make sure that a failing exit code is set for CI.
378+
# See https://github.com/flutter/flutter/issues/63742
376379
command = [
377380
'xcodebuild '
378381
'-sdk iphonesimulator '
379382
'-scheme IosUnitTests '
380383
"-destination platform='iOS Simulator,name=iPhone 8' "
381384
'test '
382-
'FLUTTER_ENGINE=' + ios_variant +
383-
' | ' + pretty
385+
'FLUTTER_ENGINE=' + ios_variant
384386
]
385387
RunCmd(command, cwd=ios_unit_test_dir, shell=True)
386388

0 commit comments

Comments
 (0)