From 3b8edc8f952adc15464181f757a375dd0d344c01 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Thu, 17 Oct 2024 14:41:27 +0200 Subject: [PATCH] tests/location: Remove the C location test The python one uses a mocked GeoClue2 which is always available and the tests cases already check more than the C variant. Let's drop the C one which fails for weird reasons on some systems. --- tests/location.h | 4 ---- tests/meson.build | 2 -- tests/test-portals.c | 19 ------------------- 3 files changed, 25 deletions(-) delete mode 100644 tests/location.h diff --git a/tests/location.h b/tests/location.h deleted file mode 100644 index 0f089f57f..000000000 --- a/tests/location.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -void test_location_basic (void); -void test_location_accuracy (void); diff --git a/tests/meson.build b/tests/meson.build index a87f89008..eb0faec9e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -109,7 +109,6 @@ if have_libportal 'email.c', 'filechooser.c', 'inhibit.c', - 'location.c', 'notification.c', 'openuri.c', 'print.c', @@ -167,7 +166,6 @@ portal_tests = [ 'color', 'email', 'inhibit', - 'location', 'notification', 'openfile', 'openuri', diff --git a/tests/test-portals.c b/tests/test-portals.c index 8fcaf8e76..ea34d2595 100644 --- a/tests/test-portals.c +++ b/tests/test-portals.c @@ -16,7 +16,6 @@ #include "email.h" #include "filechooser.h" #include "inhibit.h" -#include "location.h" #include "notification.h" #include "openuri.h" #include "print.h" @@ -399,17 +398,6 @@ global_teardown (void) g_object_unref (dbus); } -#ifdef HAVE_GEOCLUE -#define check_geoclue(name) -#else -#define check_geoclue(name) \ - if (strcmp (name , "location") == 0) \ - { \ - g_test_skip ("Skipping tests that require geoclue"); \ - return; \ - } -#endif - /* Just check that the portal is there, and has the * expected version. This will fail if the backend * is not found. @@ -421,8 +409,6 @@ test_##pp##_exists (void) \ g_autoptr(GDBusProxy) proxy = NULL; \ g_autoptr(GError) error = NULL; \ g_autofree char *owner = NULL; \ - \ - check_geoclue ( #pp ) \ \ proxy = G_DBUS_PROXY (xdp_dbus_##pp##_proxy_new_sync (session_bus, \ 0, \ @@ -445,7 +431,6 @@ DEFINE_TEST_EXISTS(email, EMAIL, 4) DEFINE_TEST_EXISTS(file_chooser, FILE_CHOOSER, 4) DEFINE_TEST_EXISTS(game_mode, GAME_MODE, 4) DEFINE_TEST_EXISTS(inhibit, INHIBIT, 3) -DEFINE_TEST_EXISTS(location, LOCATION, 1) DEFINE_TEST_EXISTS(network_monitor, NETWORK_MONITOR, 3) DEFINE_TEST_EXISTS(notification, NOTIFICATION, 1) DEFINE_TEST_EXISTS(open_uri, OPEN_URI, 5) @@ -478,7 +463,6 @@ main (int argc, char **argv) g_test_add_func ("/portal/filechooser/exists", test_file_chooser_exists); g_test_add_func ("/portal/gamemode/exists", test_game_mode_exists); g_test_add_func ("/portal/inhibit/exists", test_inhibit_exists); - g_test_add_func ("/portal/location/exists", test_location_exists); g_test_add_func ("/portal/networkmonitor/exists", test_network_monitor_exists); g_test_add_func ("/portal/notification/exists", test_notification_exists); g_test_add_func ("/portal/openuri/exists", test_open_uri_exists); @@ -593,9 +577,6 @@ main (int argc, char **argv) g_test_add_func ("/portal/wallpaper/cancel2", test_wallpaper_cancel2); g_test_add_func ("/portal/wallpaper/permission", test_wallpaper_permission); - g_test_add_func ("/portal/location/basic", test_location_basic); - g_test_add_func ("/portal/location/accuracy", test_location_accuracy); - g_test_add_func ("/portal/background/basic1", test_background_basic1); g_test_add_func ("/portal/background/basic2", test_background_basic2); g_test_add_func ("/portal/background/commandline", test_background_commandline);