Skip to content

Commit

Permalink
Run snapshot tests everywhere but render/compare only on mac (#8252)
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 authored Dec 2, 2024
1 parent c9a1e42 commit 91dc5a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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");
}

0 comments on commit 91dc5a9

Please sign in to comment.