[devtools] force locale to C for postgresql test clusters
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 10 Feb 2014 16:06:16 +0100
changeset 9519 32662203e334
parent 9513 a7e0746f010c
child 9520 78702b55c089
[devtools] force locale to C for postgresql test clusters Avoids initdb failure with e.g. iso8859-X locale and utf-8 encoding.
devtools/__init__.py
--- a/devtools/__init__.py	Tue Feb 04 11:23:58 2014 +0100
+++ b/devtools/__init__.py	Mon Feb 10 16:06:16 2014 +0100
@@ -545,7 +545,7 @@
         super(PostgresTestDataBaseHandler, self).__init__(config)
         datadir = join(self.config.apphome, 'pgdb')
         if not exists(datadir):
-            subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8'])
+            subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8', '--locale=C'])
         port = self.system_source['db-port']
         subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k /tmp -p %s' % port])
         self.__CTL.add(datadir)