Tests: Enable screenshot tests on arm64

Of the available 71 screenshot tests that we have, 42 fail on macOS
arm64. Let's make it possible to skip those and run the remaining
succeeding screenshot tests on arm64 anyway.
This commit is contained in:
Jelle Raaijmakers 2025-07-15 14:49:18 +02:00
commit 616a2af23d
Notes: github-actions[bot] 2025-07-16 06:37:29 +00:00
2 changed files with 55 additions and 4 deletions

View file

@ -320,3 +320,48 @@ Text/input/wpt-import/webaudio/the-audio-api/the-periodicwave-interface/periodic
; https://github.com/LadybirdBrowser/ladybird/issues/5333
Text/input/wpt-import/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html
Text/input/wpt-import/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html
[Skipped:arm64]
; These Screenshot tests fail because of tiny rendering differences by Skia between Linux @ x86_64 and Linux/macOS @ arm64.
Screenshot/input/border-radius.html
Screenshot/input/canvas-arcs-and-ellipses.html
Screenshot/input/canvas-fillstyle-gradients.html
Screenshot/input/canvas-filters.html
Screenshot/input/canvas-implict-moves-and-lines.html
Screenshot/input/canvas-path-rect.html
Screenshot/input/canvas-shadow.html
Screenshot/input/canvas-text.html
Screenshot/input/clip-path-transformed.html
Screenshot/input/color-scheme.html
Screenshot/input/css-background-clip-text.html
Screenshot/input/css-background-repeat.html
Screenshot/input/css-backgrounds.html
Screenshot/input/css-color-functions.html
Screenshot/input/css-compositing.html
Screenshot/input/css-filter-drop-shadow.html
Screenshot/input/css-filter.html
Screenshot/input/image-unpremultiplied-data.html
Screenshot/input/inline-node.html
Screenshot/input/nested-boxes-with-hidden-overflow-and-border-radius.html
Screenshot/input/object-fit-position.html
Screenshot/input/opacity-stacking.html
Screenshot/input/outer-box-shadow.html
Screenshot/input/selection-start-in-end-node-2.html
Screenshot/input/selection-start-in-end-node-3.html
Screenshot/input/selection-start-in-end-node.html
Screenshot/input/svg-background-no-natural-size.html
Screenshot/input/svg-clip-path-and-mask.html
Screenshot/input/svg-clip-path-transform.html
Screenshot/input/svg-filters-lb-website.html
Screenshot/input/svg-gradient-paint-transformation.html
Screenshot/input/svg-gradient-spreadMethod.html
Screenshot/input/svg-maskContentUnits.html
Screenshot/input/svg-path-offset-rounding.html
Screenshot/input/svg-paths-cardinal-directions-less-than-1px-wide.html
Screenshot/input/svg-radialGradient.html
Screenshot/input/svg-stroke-paintstyle-with-opacity.html
Screenshot/input/svg-stroke-styles.html
Screenshot/input/svg-text-effects.html
Screenshot/input/svg-textPath.html
Screenshot/input/text-decorations.html
Screenshot/input/text-shadow.html

View file

@ -66,11 +66,19 @@ static ErrorOr<void> load_test_config(StringView test_root_path)
}
auto config = config_or_error.release_value();
auto add_to_skipped_tests = [&](auto const& group) -> ErrorOr<void> {
for (auto& key : config->keys(group))
s_skipped_tests.append(TRY(FileSystem::real_path(LexicalPath::join(test_root_path, key).string())));
return {};
};
for (auto const& group : config->groups()) {
if (group == "Skipped"sv) {
for (auto& key : config->keys(group))
s_skipped_tests.append(TRY(FileSystem::real_path(LexicalPath::join(test_root_path, key).string())));
TRY(add_to_skipped_tests(group));
} else if (group == "Skipped:arm64"sv) {
#if ARCH(AARCH64)
TRY(add_to_skipped_tests(group));
#endif
} else {
warnln("Unknown group '{}' in config {}", group, config_path);
}
@ -553,9 +561,7 @@ static ErrorOr<int> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePix
TRY(collect_dump_tests(app, tests, ByteString::formatted("{}/Text", app.test_root_path), "."sv, TestMode::Text));
TRY(collect_ref_tests(app, tests, ByteString::formatted("{}/Ref", app.test_root_path), "."sv));
TRY(collect_crash_tests(app, tests, ByteString::formatted("{}/Crash", app.test_root_path), "."sv));
#if defined(AK_OS_LINUX) && ARCH(X86_64)
TRY(collect_ref_tests(app, tests, ByteString::formatted("{}/Screenshot", app.test_root_path), "."sv));
#endif
tests.remove_all_matching([&](auto const& test) {
static constexpr Array support_file_patterns {