Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
++
  • Loading branch information
matanlurey committed Jun 28, 2024
commit a4ab3878bade59636b6c873d3b75408ddee813b3
21 changes: 16 additions & 5 deletions testing/scenario_app/bin/run_ios_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ void main(List<String> args) async {
// Parse the command-line arguments.
final results = _args.parse(args);
final String iosEngineVariant;
if (args.length == 1) {
iosEngineVariant = args[0];
if (results.rest case [final variant]) {
iosEngineVariant = variant;
} else if (ffi.Abi.current() == ffi.Abi.macosArm64) {
iosEngineVariant = 'ios_debug_sim_unopt_arm64';
} else {
Expand Down Expand Up @@ -163,7 +163,7 @@ Future<void> _run(
iosEngineVariant: iosEngineVariant,
xcodeBuildExtraArgs: [
..._skipTestsForImpeller,
_infplistFPathForImpeller,
_infoPlistFPathForImpeller(engine),
],
);
cleanup.add(process.kill);
Expand Down Expand Up @@ -378,12 +378,23 @@ final _skipTestsForImpeller = [
'ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView',
'ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView',
'ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays',
].map((name) => '-skip-testing $name').toList();
].map((name) => '-skip-testing:$name').toList();

/// Plist with `FTEEnableImpeller=YES`; all projects in the workspace require this file.
///
/// For example, `FlutterAppExtensionTestHost` has a dummy file under the below directory.
final _infplistFPathForImpeller = path.join('Scenarios', 'Info_Impeller.plist');
String _infoPlistFPathForImpeller(Engine engine) {
final infoPath = path.join(
engine.flutterDir.path,
'testing',
'scenario_app',
'ios',
'Scenarios',
'Scenarios',
'Info_Impeller.plist',
);
return 'INFOPLIST_FILE=$infoPath';
}

@useResult
String _zipAndStoreFailedTestResults({
Expand Down
80 changes: 38 additions & 42 deletions testing/scenario_app/run_ios_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e


# Needed because if it is set, cd may print the path it changed to.
unset CDPATH

Expand All @@ -24,10 +25,7 @@ function follow_links() (
)

SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")")
SRC_DIR="$(
cd "$SCRIPT_DIR/../../.."
pwd -P
)"
SRC_DIR="$(cd "$SCRIPT_DIR/../../.."; pwd -P)"

if uname -m | grep "arm64"; then
FLUTTER_ENGINE="ios_debug_sim_unopt_arm64"
Expand All @@ -52,7 +50,7 @@ RESULT_BUNDLE_PATH="${SCENARIO_PATH}/${RESULT_BUNDLE_FOLDER}"

# Zip and upload xcresult to luci.
# First parameter ($1) is the zip output name.
zip_and_upload_xcresult_to_luci() {
zip_and_upload_xcresult_to_luci () {
# We don't want the zip to contain the abusolute path,
# so use relative path (./$RESULT_BUNDLE_FOLDER) instead.
zip -q -r $1 "./$RESULT_BUNDLE_FOLDER"
Expand All @@ -70,10 +68,10 @@ readonly OS="17.0"
echo "Deleting any existing devices names $DEVICE_NAME..."
RESULT=0
while [[ $RESULT == 0 ]]; do
xcrun simctl delete "$DEVICE_NAME" || RESULT=1
if [ $RESULT == 0 ]; then
echo "Deleted $DEVICE_NAME"
fi
xcrun simctl delete "$DEVICE_NAME" || RESULT=1
if [ $RESULT == 0 ]; then
echo "Deleted $DEVICE_NAME"
fi
done
echo ""

Expand Down Expand Up @@ -102,41 +100,39 @@ echo ""

# Skip testFontRenderingWhenSuppliedWithBogusFont: https://github.com/flutter/flutter/issues/113250
# Skip golden tests that use software rendering: https://github.com/flutter/flutter/issues/131888
if
set -o pipefail && xcodebuild -sdk iphonesimulator \
-scheme Scenarios \
-resultBundlePath "$RESULT_BUNDLE_PATH/ios_scenario.xcresult" \
-destination "platform=iOS Simulator,OS=$OS,name=$DEVICE_NAME" \
clean test \
FLUTTER_ENGINE="$FLUTTER_ENGINE" \
-skip-testing ScenariosUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView \
-skip-testing ScenariosUITests/MultiplePlatformViewsTest/testPlatformView \
-skip-testing ScenariosUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipPathTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationOpacityTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewRotation/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewUITests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/RenderingSelectionTest/testSoftwareRendering \
-skip-testing ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays
if set -o pipefail && xcodebuild -sdk iphonesimulator \
-scheme Scenarios \
-resultBundlePath "$RESULT_BUNDLE_PATH/ios_scenario.xcresult" \
-destination "platform=iOS Simulator,OS=$OS,name=$DEVICE_NAME" \
clean test \
FLUTTER_ENGINE="$FLUTTER_ENGINE" \
-skip-testing ScenariosUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView \
-skip-testing ScenariosUITests/MultiplePlatformViewsTest/testPlatformView \
-skip-testing ScenariosUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipPathTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationOpacityTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewMutationTransformTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewRotation/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewUITests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/RenderingSelectionTest/testSoftwareRendering \
-skip-testing ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \
-skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \
-skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \
# Plist with FLTEnableImpeller=YES, all projects in the workspace requires this file.
# For example, FlutterAppExtensionTestHost has a dummy file under the below directory.
INFOPLIST_FILE="Scenarios/Info_Impeller.plist"
then
INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then
echo "test success."
else
echo "test failed."
Expand Down