From 94df80b301c1fb40c3f5403844912ff6c22e4e2f Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 2 Feb 2023 11:24:29 +0100 Subject: Skip geoclue calls during the rotation lock test --- src/rotation-lock.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rotation-lock.cpp b/src/rotation-lock.cpp index 566025e..9864744 100644 --- a/src/rotation-lock.cpp +++ b/src/rotation-lock.cpp @@ -123,7 +123,12 @@ public: #ifdef COLOR_TEMP_ENABLED if (ayatana_common_utils_is_lomiri() == FALSE) { - gclue_simple_new_with_thresholds ("ayatana-indicator-display", GCLUE_ACCURACY_LEVEL_CITY, 0, 0, NULL, onGeoClueLoaded, this); + const gchar *sTest = g_getenv ("TEST_NAME"); + + if (sTest == NULL || !g_str_equal (sTest, "rotation-lock-test")) + { + gclue_simple_new_with_thresholds ("ayatana-indicator-display", GCLUE_ACCURACY_LEVEL_CITY, 0, 0, NULL, onGeoClueLoaded, this); + } GVariant *pProfile = g_settings_get_value (this->m_settings, "color-temp-profile"); guint nProfile = g_variant_get_uint16 (pProfile); -- cgit v1.2.3