From 2e49487ccb3550e8a83521fb828769d078afca1e Mon Sep 17 00:00:00 2001 From: Antoine Beyeler Date: Fri, 29 Nov 2024 11:01:45 +0100 Subject: [PATCH 1/2] Run snapshot tests everywhere but render/compare only on mac --- crates/viewer/re_time_panel/tests/time_panel_tests.rs | 4 ++-- crates/viewer/re_ui/tests/list_item_tests.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/viewer/re_time_panel/tests/time_panel_tests.rs b/crates/viewer/re_time_panel/tests/time_panel_tests.rs index 829c822c53bc..d3add2d81b67 100644 --- a/crates/viewer/re_time_panel/tests/time_panel_tests.rs +++ b/crates/viewer/re_time_panel/tests/time_panel_tests.rs @@ -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(); @@ -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(); @@ -105,5 +103,7 @@ fn run_time_panel_and_save_snapshot(mut test_context: TestContext, snapshot_name harness.run(); + //TODO(#8245): enable this everywhere when we have a software renderer setup + #[cfg(target_os = "macos")] harness.wgpu_snapshot(snapshot_name); } diff --git a/crates/viewer/re_ui/tests/list_item_tests.rs b/crates/viewer/re_ui/tests/list_item_tests.rs index 593b11b03748..64dea7a910fa 100644 --- a/crates/viewer/re_ui/tests/list_item_tests.rs +++ b/crates/viewer/re_ui/tests/list_item_tests.rs @@ -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"); } From 243d69929858856854362c0018d6dc1b4f9b66f4 Mon Sep 17 00:00:00 2001 From: Antoine Beyeler Date: Fri, 29 Nov 2024 11:11:47 +0100 Subject: [PATCH 2/2] lint --- crates/viewer/re_time_panel/tests/time_panel_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/viewer/re_time_panel/tests/time_panel_tests.rs b/crates/viewer/re_time_panel/tests/time_panel_tests.rs index d3add2d81b67..362161b75a5c 100644 --- a/crates/viewer/re_time_panel/tests/time_panel_tests.rs +++ b/crates/viewer/re_time_panel/tests/time_panel_tests.rs @@ -72,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 @@ -105,5 +105,5 @@ fn run_time_panel_and_save_snapshot(mut test_context: TestContext, snapshot_name //TODO(#8245): enable this everywhere when we have a software renderer setup #[cfg(target_os = "macos")] - harness.wgpu_snapshot(snapshot_name); + harness.wgpu_snapshot(_snapshot_name); }