mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure ios tests fail if they fail (flutter/engine#20518)
* Make sure ios tests fail if they fail * explain
This commit is contained in:
parent
f117f6f780
commit
4d8aaaa337
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user