Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7aba939

Browse files
committed
Remove --enable-software-rendering from iOS scenario tests
1 parent 1471967 commit 7aba939

8 files changed

+56
-10
lines changed

testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76EE22E388380012F0C1 /* PlatformViewUITests.m */; };
3333
248FDFC422FE7CD0009CC7CD /* FlutterEngineTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 248FDFC322FE7CD0009CC7CD /* FlutterEngineTest.m */; };
3434
24F1FB89230B4579005ACE7C /* TextPlatformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 24F1FB87230B4579005ACE7C /* TextPlatformView.m */; };
35+
3BFD97202A990CF50094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */; };
36+
3BFD97212A990CF50094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */; };
3537
4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */; };
3638
6402EBD124147BDA00987DCB /* UnobstructedPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */; };
3739
6816DB9E231750ED00A51400 /* GoldenPlatformViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6816DB9D231750ED00A51400 /* GoldenPlatformViewTests.m */; };
@@ -150,6 +152,8 @@
150152
24D47D1E230CA4480069DD5E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
151153
24F1FB87230B4579005ACE7C /* TextPlatformView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextPlatformView.m; sourceTree = "<group>"; };
152154
24F1FB88230B4579005ACE7C /* TextPlatformView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPlatformView.h; sourceTree = "<group>"; };
155+
3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = "<group>"; };
156+
3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png"; sourceTree = "<group>"; };
153157
4F06F1B124731F66000AF246 /* LocalizationInitializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalizationInitializationTest.m; sourceTree = "<group>"; };
154158
6402EBD024147BDA00987DCB /* UnobstructedPlatformViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnobstructedPlatformViewTests.m; sourceTree = "<group>"; };
155159
6816DB9C231750ED00A51400 /* GoldenPlatformViewTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoldenPlatformViewTests.h; sourceTree = "<group>"; };
@@ -310,6 +314,8 @@
310314
F7B464DC2759D02B00079189 /* Goldens */ = {
311315
isa = PBXGroup;
312316
children = (
317+
3BFD971E2A990CF40094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png */,
318+
3BFD971F2A990CF40094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png */,
313319
68D93AED2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png */,
314320
6860CE242A01B2FF00B68EC5 /* golden_two_platform_view_clip_path_iPhone SE (3rd generation)_16.2_simulator.png */,
315321
6860CE232A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png */,
@@ -472,6 +478,7 @@
472478
684FFF8F29F9C10700281002 /* golden_platform_view_with_other_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
473479
6860CE262A01B2FF00B68EC5 /* golden_two_platform_view_clip_rect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
474480
684FFF8A29F9C10700281002 /* golden_platform_view_clippath_with_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
481+
3BFD97212A990CF50094F51B /* golden_spawn_engine_works_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
475482
684FFF8429F9C10700281002 /* golden_non_full_screen_flutter_view_platform_view_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
476483
684FFF7C29F9C10700281002 /* golden_platform_view_cliprrect_with_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
477484
684FFF7F29F9C10700281002 /* golden_platform_view_rotate_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
@@ -481,6 +488,7 @@
481488
684FFF7E29F9C10700281002 /* golden_platform_view_opacity_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
482489
684FFF8729F9C10700281002 /* golden_platform_view_multiple_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
483490
68D93AEE2A46097E0054AB6D /* golden_platform_view_with_negative_backdrop_filter_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
491+
3BFD97202A990CF50094F51B /* golden_bogus_font_text_impeller_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
484492
684FFF8D29F9C10700281002 /* golden_platform_view_large_cliprrect_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
485493
684FFF8329F9C10700281002 /* golden_platform_view_transform_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,
486494
684FFF8B29F9C10700281002 /* golden_platform_view_clippath_iPhone SE (3rd generation)_16.2_simulator.png in Resources */,

testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenTestManager.m

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,24 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg {
5555
};
5656
});
5757
_identifier = launchArgsMap[launchArg];
58-
NSString* prefix = [NSString stringWithFormat:@"golden_%@_", _identifier];
58+
59+
// NSArray<NSBundle *> *allBundles = [NSBundle allBundles];
60+
// NSLog(@"Enumerating bundle paths");
61+
// for (id element in allBundles) {
62+
// NSLog(@"%@", [element bundleIdentifier]);
63+
// }
64+
65+
NSString* impeller = @"";
66+
NSNumber* enableImpeller = [[NSBundle bundleWithIdentifier:@"dev.flutter.ScenariosUITests"]
67+
objectForInfoDictionaryKey:@"FLTEnableImpeller"];
68+
if (enableImpeller != nil) {
69+
impeller = enableImpeller.boolValue ? @"impeller_" : @"";
70+
} else {
71+
NSLog(@"FLTEnableImpeller was nil");
72+
}
73+
NSLog(@"impeller = '%@'", impeller);
74+
75+
NSString* prefix = [NSString stringWithFormat:@"golden_%@_%@", _identifier, impeller];
5976
_goldenImage = [[GoldenImage alloc] initWithGoldenNamePrefix:prefix];
6077
_launchArg = launchArg;
6178
}
@@ -65,8 +82,8 @@ - (instancetype)initWithLaunchArg:(NSString*)launchArg {
6582
- (void)checkGoldenForTest:(XCTestCase*)test {
6683
XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
6784
if (!_goldenImage.image) {
68-
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
69-
attachment.name = [_goldenImage.goldenName stringByAppendingString:@"_new"];
85+
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot.image];
86+
attachment.name = [_goldenImage.goldenName stringByAppendingString:@"_new.png"];
7087
attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
7188
[test addAttachment:attachment];
7289
// Instead of XCTFail because that definition changed between Xcode 11 and 12 whereas this impl
@@ -79,7 +96,7 @@ - (void)checkGoldenForTest:(XCTestCase*)test {
7996

8097
if (![_goldenImage compareGoldenToImage:screenshot.image]) {
8198
XCTAttachment* screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image];
82-
screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual"];
99+
screenshotAttachment.name = [_goldenImage.goldenName stringByAppendingString:@"_actual.png"];
83100
screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways;
84101
[test addAttachment:screenshotAttachment];
85102

testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ - (void)setUp {
1818

1919
- (void)testRejectPolicyUtilTouchesEnded {
2020
XCUIApplication* app = [[XCUIApplication alloc] init];
21-
app.launchArguments =
22-
@[ @"--gesture-reject-after-touches-ended", @"--enable-software-rendering" ];
21+
app.launchArguments = @[ @"--gesture-reject-after-touches-ended" ];
2322
[app launch];
2423

2524
NSPredicate* predicateToFindPlatformView =

testing/scenario_app/ios/Scenarios/ScenariosUITests/SpawnEngineTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ - (void)testSpawnEngineWorks {
1313
self.continueAfterFailure = NO;
1414

1515
XCUIApplication* application = [[XCUIApplication alloc] init];
16-
application.launchArguments = @[ @"--spawn-engine-works", @"--enable-software-rendering" ];
16+
application.launchArguments = @[ @"--spawn-engine-works" ];
1717
[application launch];
1818

1919
XCUIElement* addTextField = application.textFields[@"ready"];

testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ - (void)setUp {
2323
// +---+
2424
- (void)testNoOverlay {
2525
XCUIApplication* app = [[XCUIApplication alloc] init];
26-
app.launchArguments =
27-
@[ @"--platform-view-no-overlay-intersection", @"--enable-software-rendering" ];
26+
app.launchArguments = @[ @"--platform-view-no-overlay-intersection" ];
2827
[app launch];
2928

3029
XCUIElement* platform_view = app.otherElements[@"platform_view[0]"];

testing/scenario_app/run_ios_tests.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,30 @@ if set -o pipefail && xcodebuild -sdk iphonesimulator \
8585
-destination 'platform=iOS Simulator,OS=16.2,name=iPhone SE (3rd generation)' \
8686
clean test \
8787
FLUTTER_ENGINE="$FLUTTER_ENGINE" \
88-
-skip-testing "ScenariosUITests/BogusFontTextTest/testFontRenderingWhenSuppliedWithBogusFont,ScenarioUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsTest/testPlatformView,ScenarioUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView,ScenarioUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewGestureRecognizerTests/testRejectPolicyUtilTouchesEnded,ScenarioUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewUITests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipPathTests/testPlatformView,ScenarioUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView,ScenarioUITests/PlatformViewMutationOpacityTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView,ScenarioUITests/SpawnEngineTest/testSpawnEngineWorks,ScenarioUITests/PlatformViewRotation/testPlatformView,ScenarioUITests/TwoPlatformViewClipRRectTests/testPlatformView,ScenarioUITests/TwoPlatformViewClipRectTests/testPlatformView,ScenarioUITests/RenderingSelectionTest/testSoftwareRendering,ScenarioUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays,ScenarioUITests/UnobstructedPlatformViewTests/testNoOverlay,ScenarioUITests/PlatformViewMutationTransformTests/testPlatformView,ScenarioUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView,ScenarioUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView" \
88+
-skip-testing ScenariosUITests/MultiplePlatformViewsBackgroundForegroundTest/testPlatformView \
89+
-skip-testing ScenariosUITests/MultiplePlatformViewsTest/testPlatformView \
90+
-skip-testing ScenariosUITests/NonFullScreenFlutterViewPlatformViewUITests/testPlatformView \
91+
-skip-testing ScenariosUITests/PlatformViewMutationClipPathTests/testPlatformView \
92+
-skip-testing ScenariosUITests/PlatformViewMutationClipPathWithTransformTests/testPlatformView \
93+
-skip-testing ScenariosUITests/PlatformViewMutationClipRectAfterMovedTests/testPlatformView \
94+
-skip-testing ScenariosUITests/PlatformViewMutationClipRectTests/testPlatformView \
95+
-skip-testing ScenariosUITests/PlatformViewMutationClipRectWithTransformTests/testPlatformView \
96+
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectTests/testPlatformView \
97+
-skip-testing ScenariosUITests/PlatformViewMutationClipRRectWithTransformTests/testPlatformView \
98+
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectTests/testPlatformView \
99+
-skip-testing ScenariosUITests/PlatformViewMutationLargeClipRRectWithTransformTests/testPlatformView \
100+
-skip-testing ScenariosUITests/PlatformViewMutationOpacityTests/testPlatformView \
101+
-skip-testing ScenariosUITests/PlatformViewMutationTransformTests/testPlatformView \
102+
-skip-testing ScenariosUITests/PlatformViewRotation/testPlatformView \
103+
-skip-testing ScenariosUITests/PlatformViewUITests/testPlatformView \
104+
-skip-testing ScenariosUITests/PlatformViewWithNegativeOtherBackDropFilterTests/testPlatformView \
105+
-skip-testing ScenariosUITests/PlatformViewWithOtherBackdropFilterTests/testPlatformView \
106+
-skip-testing ScenariosUITests/RenderingSelectionTest/testSoftwareRendering \
107+
-skip-testing ScenariosUITests/TwoPlatformViewClipPathTests/testPlatformView \
108+
-skip-testing ScenariosUITests/TwoPlatformViewClipRectTests/testPlatformView \
109+
-skip-testing ScenariosUITests/TwoPlatformViewClipRRectTests/testPlatformView \
110+
-skip-testing ScenariosUITests/TwoPlatformViewsWithOtherBackDropFilterTests/testPlatformView \
111+
-skip-testing ScenariosUITests/UnobstructedPlatformViewTests/testMultiplePlatformViewsWithOverlays \
89112
INFOPLIST_FILE="Scenarios/Info_Impeller.plist"; then # Plist with FLTEnableImpeller=YES
90113
echo "test success."
91114
else

0 commit comments

Comments
 (0)