[gnome-desktop/jbicha/gnome-desktop-tests-unset-env: 2/3] tests: unset language-related environment variables



commit 58eba765305906b97a2e89723e92bfdc4cb36eeb
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Tue Feb 12 17:11:48 2019 -0500

    tests: unset language-related environment variables
    
    This fixes the tests in environments where these variables have
    been set, such as on developer's personal systems.

 tests/wallclock-reftest.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index da8cafd4..42783869 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -573,13 +573,18 @@ main (int argc, char **argv)
   const char *basedir;
   GFile *file;
 
+  /* unset environment variables that can interfere with our tests */
+  unsetenv("LANG");
+  unsetenv("LANGUAGE");
+  unsetenv("LC_ALL");
+  unsetenv("LC_TIME");
+
   /* I don't want to fight fuzzy scaling algorithms in GPUs,
    * so unless you explicitly set it to something else, we
    * will use Cairo's image surface.
    */
   g_setenv ("GDK_RENDERING", "image", FALSE);
 
-  setlocale (LC_ALL, "");
   g_test_init (&argc, &argv, NULL);
   gtk_init (&argc, &argv);
 


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