Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .github/workflows/release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ jobs:
- build_name: linux-x86_64
os: ubuntu-24.04

- build_name: linux-aarch64
os: ubuntu-24.04-arm

# Mac does two Rust builds to make a universal binary
- build_name: macos-x86_64
os: macos-14
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/test_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
fail-fast: false
matrix:
rust_version: [stable]
os: [ubuntu-24.04, windows-latest, macos-14]
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, macos-14]
include:
- rust_version: nightly
os: ubuntu-24.04
Expand Down Expand Up @@ -102,9 +102,14 @@ jobs:
with:
tool: cargo-nextest

- name: OS related
if: matrix.os == 'ubuntu-24.04-arm'
shell: bash
run: echo ARM_SPECIFIC= | tee -a $GITHUB_ENV

- name: Run tests
shell: bash
run: cargo nextest run --profile ci --cargo-profile ci ${TEST_OPTS} --features ${FEATURES}
run: ${ARM_SPECIFIC} cargo nextest run --profile ci --cargo-profile ci ${TEST_OPTS} --features ${FEATURES}

- name: Run doctests
shell: bash
Expand Down Expand Up @@ -188,7 +193,7 @@ jobs:
strategy:
matrix:
rust_version: [stable]
os: [ubuntu-24.04, windows-latest, macos-14]
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, macos-14]
include:
- rust_version: nightly
os: ubuntu-24.04
Expand Down
1 change: 1 addition & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ runtime = "AIR" # The runtime to emulate ("FlashPlayer" or "AIR"). Defaults to "
[image_comparisons.COMPARISON_NAME] # COMPARISON_NAME is a name of this particular image
tolerance = 0 # The tolerance per pixel channel to be considered "the same". Increase as needed with tests that aren't pixel perfect across platforms.
max_outliers = 0 # Maximum number of outliers allowed over the given tolerance levels. Increase as needed with tests that aren't pixel perfect across platforms.
max_outliers_arm = 0 # ARM max_outliers value.
trigger = "last_frame" # When to trigger this capture. Options are last_frame (default), fs_command, or a frame/tick number (1-based). Only one image may exist per frame/tick number or last_frame.

# Which build features are required for this test to run.
Expand Down
11 changes: 9 additions & 2 deletions tests/framework/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use ruffle_render::backend::RenderBackend;
use ruffle_render::quality::StageQuality;
use serde::Deserialize;
use std::collections::{HashMap, HashSet};
use std::env;
use std::time::Duration;
use vfs::VfsPath;

Expand Down Expand Up @@ -241,6 +242,7 @@ impl PlayerOptions {
pub struct ImageComparison {
tolerance: u8,
max_outliers: usize,
max_outliers_arm: usize,
pub trigger: ImageTrigger,
}

Expand Down Expand Up @@ -323,7 +325,12 @@ impl ImageComparison {
.max()
.unwrap();

if outliers > self.max_outliers {
let mut max_outliers = self.max_outliers;
if env::var("ARM_SPECIFIC").is_ok() && self.max_outliers_arm != 0 {
max_outliers = self.max_outliers_arm
}

if outliers > max_outliers {
save_actual_image()?;

let mut difference_color = Vec::with_capacity(
Expand Down Expand Up @@ -377,7 +384,7 @@ impl ImageComparison {
"Image '{}' failed: Number of outliers ({}) is bigger than allowed limit of {}. Max difference is {}",
name,
outliers,
self.max_outliers,
max_outliers,
max_difference
));
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/swfs/avm1/mcl_target_jpg/test.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 11

[image_comparisons.output]
tolerance = 0
tolerance = 3

[player_options]
with_renderer = { optional = true, sample_count = 1 }
with_renderer = { optional = true, sample_count = 1 }
4 changes: 2 additions & 2 deletions tests/tests/swfs/avm1/movieclip_begin_gradient_fill/test.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 3
tolerance = 6

[player_options]
with_renderer = { optional = false, sample_count = 1 }
with_renderer = { optional = false, sample_count = 1 }
4 changes: 2 additions & 2 deletions tests/tests/swfs/avm1/movieclip_line_gradient_style/test.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 3
tolerance = 6

[player_options]
with_renderer = { optional = false, sample_count = 1 }
with_renderer = { optional = false, sample_count = 1 }
1 change: 1 addition & 0 deletions tests/tests/swfs/avm2/blend_shader_luma_lighten/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ num_ticks = 1

[image_comparisons.output]
tolerance = 2
max_outliers_arm = 340

[player_options]
with_renderer = { optional = false, sample_count = 1 }
2 changes: 1 addition & 1 deletion tests/tests/swfs/avm2/pixelbender_dithering/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ num_ticks = 1

[image_comparisons.output]
tolerance = 1
max_outliers = 19813
max_outliers = 19929

[player_options]
with_renderer = { optional = false, sample_count = 1 }
2 changes: 1 addition & 1 deletion tests/tests/swfs/avm2/stage3d_bitmap/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
num_frames = 50

[image_comparisons.output]
tolerance = 2
tolerance = 4

[player_options]
with_renderer = { optional = false, sample_count = 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ num_frames = 1
tolerance = 1
# FIXME - investigate why this is so high
max_outliers = 1935
max_outliers_arm = 3237

[player_options]
with_renderer = { optional = true, sample_count = 1 }
1 change: 1 addition & 0 deletions tests/tests/swfs/avm2/stage3d_raytrace/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ num_frames = 80
[image_comparisons.output]
tolerance = 1
max_outliers = 10
max_outliers_arm = 175

[player_options]
# This test runs very slowly on unoptimized `test` builds,
Expand Down
1 change: 1 addition & 0 deletions tests/tests/swfs/avm2/stage3d_texture/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ num_frames = 5
tolerance = 2
# FIXME - figure out why this needs to be so high
max_outliers = 117
max_outliers_arm = 4935

[player_options]
with_renderer = { optional = false, sample_count = 1 }
4 changes: 2 additions & 2 deletions tests/tests/swfs/avm2/stage3d_texture_bytearray/test.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
num_frames = 1

[image_comparisons.output]
tolerance = 2
tolerance = 4

[player_options]
with_renderer = { optional = true, sample_count = 1 }

[required_features]
jpegxr = true
jpegxr = true
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 2
tolerance = 4
max_outliers = 66

[player_options]
Expand All @@ -12,4 +12,4 @@ jpegxr = true

# Textures were generated with:
# png2atf.exe -i ruffle_logo.png -c d -r -o ruffle_logo.atf
# png2atf.exe -i circle.png -c d -r -o circle.atf
# png2atf.exe -i circle.png -c d -r -o circle.atf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ num_frames = 1
[image_comparisons.output]
tolerance = 2
max_outliers = 66
max_outliers_arm = 177

[player_options]
with_renderer = { optional = false, sample_count = 1 }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 7
tolerance = 13

[player_options]
with_renderer = { optional = true, sample_count = 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ num_ticks = 1
[image_comparisons."output"]
trigger = 1
tolerance = 32
max_outliers = 16
max_outliers = 17

[player_options]
with_renderer = { optional = false, sample_count = 4 }
1 change: 1 addition & 0 deletions tests/tests/swfs/visual/filters/displacement_map/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ num_frames = 1
[image_comparisons.output]
tolerance = 20
max_outliers = 72
max_outliers_arm = 1195

[player_options]
with_renderer = { optional = false, sample_count = 1 }
2 changes: 1 addition & 1 deletion tests/tests/swfs/visual/gradient_issue_9892/test.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 6
tolerance = 12

[player_options]
with_renderer = { optional = true, sample_count = 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 2
tolerance = 4

[player_options]
with_renderer = { optional = false, sample_count = 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 0
tolerance = 3

[player_options]
with_renderer = { optional = false, sample_count = 1 }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 2
tolerance = 3
max_outliers = 3

[player_options]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
num_frames = 1

[image_comparisons.output]
tolerance = 6
tolerance = 13

[player_options]
with_renderer = { optional = true, sample_count = 1 }
with_renderer = { optional = true, sample_count = 1 }