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



commit d8aad74d78c53dc70afebd3d03df1f0cd081d9b3
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        | 9 ++++++---
 tests/wallclock-reftest.c | 3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tests/wall-clock.c b/tests/wall-clock.c
index 23929ebd..486cfa38 100644
--- a/tests/wall-clock.c
+++ b/tests/wall-clock.c
@@ -62,7 +62,8 @@ 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");
+               g_test_message ("en_US.utf8 locale not found");
+               g_test_fail ();
                return;
        }
        uselocale (locale);
@@ -79,7 +80,8 @@ test_utf8_character (const char *utf8_char,
          * 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");
+               g_test_message ("he_IL.utf8 locale not found");
+               g_test_fail ();
                return;
        }
        uselocale (locale);
@@ -122,7 +124,8 @@ test_clock_format_setting (void)
 
        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");
+               g_test_message ("en_US.utf8 locale not found");
+               g_test_fail ();
                return;
        }
        save_locale = uselocale (locale);
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index 9c90eeca..1238ea89 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -448,7 +448,8 @@ test_ui_file (GFile         *file,
   loc = newlocale (LC_ALL_MASK, locale, (locale_t) 0);
   if (loc == (locale_t)0)
     {
-      g_test_skip("locale not found, skipping");
+      g_test_message ("locale '%s' not found", locale);
+      g_test_fail();
       return;
     }
   previous_locale = uselocale (loc);


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