This is a quick fix for 7194691 which might save people, who don't know about the unwritten rule of running the test suite under locale C, some time.

Pasted below since it's really short:

*************************************************************************
diff -r 51fb9d5c5921 src/tests/run.py
--- a/src/tests/run.py  Mon Aug 20 13:56:23 2012 -0700
+++ b/src/tests/run.py  Tue Aug 28 14:25:39 2012 -0700
@@ -319,6 +319,21 @@
                 print >> sys.stderr, "-q cannot be used with -v or -p"
                 usage()

+        def print_lc_warn():
+                print >> sys.stderr, \
+                    "WARNING: You don't seem to use the C locale." \
+                    " Some tests may fail. \n" \
+                    "Set the C locale by setting LC_ALL=C"
+
+        # If LANG is set to C and LC_ALL is not set at all, we're good.
+        # If LC_ALL is set, LANG doesn't matter.
+        if "LC_ALL" in os.environ:
+                if os.environ["LC_ALL"] != "C":
+                        print_lc_warn()
+        elif "LANG" in os.environ:
+                if os.environ["LANG"] != "C":
+                        print_lc_warn()
+
         if output != OUTPUT_DOTS:
                 quiet = True
         if not onlyval:
*************************************************************************

Thanks
Erik
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to