[gnome-desktop/wip/hadess/revert-missing-locale] Revert "tests/wall*: Do not fail if some of the locales is missing"



commit 67fabacfe2073bba70d7ced98dd402c9998e2df6
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Apr 6 17:18:52 2020 +0200

    Revert "tests/wall*: Do not fail if some of the locales is missing"
    
    Running all the tests isn't optional, and could lead to tests being
    skipped if there's any sort of transient problem with the CI setup.
    
    Seeing as those tests test things that could easily be broken by someone
    who doesn't run those languages, we need the tests to be run.
    
    We'll keep the locale setting checks though, to fail more gracefully
    when locales are not installed correctly.
    
    This reverts commit 9ae847ec875efe443d51d584fa6c61966c7c3c7c.

 tests/wall-clock.c        | 14 --------------
 tests/wallclock-reftest.c |  5 -----
 2 files changed, 19 deletions(-)
---
diff --git a/tests/wall-clock.c b/tests/wall-clock.c
index 23929ebd..4937ee66 100644
--- a/tests/wall-clock.c
+++ b/tests/wall-clock.c
@@ -48,7 +48,6 @@ test_utf8_character (const char *utf8_char,
        /* In the C locale, make sure the time string is formatted with regular
          * colons */
        locale = newlocale (LC_ALL_MASK, "C", (locale_t) 0);
-       g_assert_true (locale != (locale_t)0);
        save_locale = uselocale (locale);
        clock = gnome_wall_clock_new ();
        str = gnome_wall_clock_string_for_datetime (clock,
@@ -61,10 +60,6 @@ test_utf8_character (const char *utf8_char,
 
        /* In a UTF8 locale, we want ratio characters and no colons. */
        locale = newlocale (LC_ALL_MASK, "en_US.utf8", locale);
-       if (locale == (locale_t)0) {
-               g_test_skip("en_US.utf8 locale not found, skipping");
-               return;
-       }
        uselocale (locale);
        clock = gnome_wall_clock_new ();
        str = gnome_wall_clock_string_for_datetime (clock,
@@ -78,10 +73,6 @@ test_utf8_character (const char *utf8_char,
        /* ... and same thing with an RTL locale: should be formatted with
          * ratio characters */
        locale = newlocale (LC_ALL_MASK, "he_IL.utf8", locale);
-       if (locale == (locale_t)0) {
-               g_test_skip("he_IL.utf8 locale not found, skipping");
-               return;
-       }
        uselocale (locale);
        clock = gnome_wall_clock_new ();
        str = gnome_wall_clock_string_for_datetime (clock,
@@ -121,10 +112,6 @@ test_clock_format_setting (void)
        const char *str;
 
        locale = newlocale (LC_ALL_MASK, "en_US.utf8", (locale_t) 0);
-       if (locale == (locale_t)0) {
-               g_test_skip("en_US.utf8 locale not found, skipping");
-               return;
-       }
        save_locale = uselocale (locale);
 
        settings = g_settings_new ("org.gnome.desktop.interface");
@@ -205,7 +192,6 @@ test_weekday_setting (void)
 
        /* Save current locale */
        locale = newlocale (LC_ALL_MASK, "C", (locale_t) 0);
-       g_assert_true (locale != (locale_t)0);
        save_locale = uselocale (locale);
        settings = g_settings_new ("org.gnome.desktop.interface");
 
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index 9c90eeca..3b961007 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -446,11 +446,6 @@ test_ui_file (GFile         *file,
   locale = get_locale_for_file (ui_file);
   g_assert (locale);
   loc = newlocale (LC_ALL_MASK, locale, (locale_t) 0);
-  if (loc == (locale_t)0)
-    {
-      g_test_skip("locale not found, skipping");
-      return;
-    }
   previous_locale = uselocale (loc);
   g_assert_true (previous_locale != (locale_t) 0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]