Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run snapshot tests everywhere but render/compare only on mac #8252

Merged
merged 2 commits into from
Dec 2, 2024
Merged
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
8 changes: 4 additions & 4 deletions crates/viewer/re_time_panel/tests/time_panel_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use re_viewer_context::test_context::TestContext;
use re_viewport_blueprint::ViewportBlueprint;

#[test]
#[cfg_attr(not(target_os = "macos"), ignore)]
pub fn time_panel_two_sections_should_match_snapshot() {
TimePanel::ensure_registered_subscribers();
let mut test_context = TestContext::default();
Expand All @@ -38,7 +37,6 @@ pub fn time_panel_two_sections_should_match_snapshot() {
}

#[test]
#[cfg_attr(not(target_os = "macos"), ignore)]
pub fn time_panel_dense_data_should_match_snapshot() {
TimePanel::ensure_registered_subscribers();
let mut test_context = TestContext::default();
Expand Down Expand Up @@ -74,7 +72,7 @@ pub fn time_panel_dense_data_should_match_snapshot() {
run_time_panel_and_save_snapshot(test_context, "time_panel_dense_data");
}

fn run_time_panel_and_save_snapshot(mut test_context: TestContext, snapshot_name: &str) {
fn run_time_panel_and_save_snapshot(mut test_context: TestContext, _snapshot_name: &str) {
let mut panel = TimePanel::default();

//TODO(ab): this contains a lot of boilerplate which should be provided by helpers
Expand Down Expand Up @@ -105,5 +103,7 @@ fn run_time_panel_and_save_snapshot(mut test_context: TestContext, snapshot_name

harness.run();

harness.wgpu_snapshot(snapshot_name);
//TODO(#8245): enable this everywhere when we have a software renderer setup
#[cfg(target_os = "macos")]
harness.wgpu_snapshot(_snapshot_name);
}
2 changes: 2 additions & 0 deletions crates/viewer/re_ui/tests/list_item_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,7 @@ pub fn test_list_items_should_match_snapshot() {

harness.run();

//TODO(#8245): enable this everywhere when we have a software renderer setup
#[cfg(target_os = "macos")]
harness.wgpu_snapshot("list_items");
}