From 5f6b1516ae6607cc3ffc20c6371ece18aae2528b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 6 Feb 2024 11:01:46 +0000 Subject: [PATCH] tests: Rework how slow param test is skipped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s more helpful to always register the test, even if it’s normally skipped, since then the skip is recorded in the test logs so people can see what’s ‘missing’ from them. Signed-off-by: Philip Withnall --- gobject/tests/param.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gobject/tests/param.c b/gobject/tests/param.c index 160eff4c3..9d22135cc 100644 --- a/gobject/tests/param.c +++ b/gobject/tests/param.c @@ -1397,6 +1397,13 @@ test_param_implement (void) { gchar *test_path; + /* This test is slow. */ + if (!g_test_slow ()) + { + g_test_skip ("Skipping slow /param/implement test"); + return; + } + for (change_this_flag = 0; change_this_flag < 16; change_this_flag++) for (change_this_type = 0; change_this_type < 3; change_this_type++) for (use_this_flag = 0; use_this_flag < 16; use_this_flag++) @@ -1658,8 +1665,7 @@ main (int argc, char *argv[]) g_test_add_func ("/param/validate", test_param_validate); g_test_add_func ("/param/convert", test_param_convert); - if (g_test_slow ()) - g_test_add_func ("/param/implement", test_param_implement); + g_test_add_func ("/param/implement", test_param_implement); for (data.change_this_flag = 0; data.change_this_flag < 16; data.change_this_flag++) for (data.change_this_type = 0; data.change_this_type < 3; data.change_this_type++)