[reprotest] 01/01: More variations for the locale
Ximin Luo
infinity0 at debian.org
Thu Jan 5 18:11:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit 8b18046b6e96628cba2e2ce6011766ef964a71a9
Author: Ximin Luo <infinity0 at debian.org>
Date: Thu Jan 5 17:55:58 2017 +0100
More variations for the locale
---
reprotest/__init__.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 0423ea1..e245360 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -7,6 +7,7 @@ import configparser
import logging
import os
import pathlib
+import random
import re
import shlex
import shutil
@@ -276,12 +277,11 @@ def kernel(script, env, tree, *args):
# TODO: what exact locales and how to many test is probably a mailing
# list question.
def locales(script, env, tree, *args):
- # env1['LANG'] = 'C'
- new_control = add(env.control, 'LC_ALL', 'C')
- new_experiment = add(add(env.experiment, 'LANG', 'fr_CH.UTF-8'),
- 'LC_ALL', 'fr_CH.UTF-8')
- # env1['LANGUAGE'] = 'en_US:en'
- # env2['LANGUAGE'] = 'fr_CH:fr'
+ new_control = add(add(env.control, 'LANG', 'C.UTF-8'), 'LANGUAGE', 'en_US:en')
+ # if there is an issue with this being random, we could instead select it
+ # based on a deterministic hash of the inputs
+ loc = random.choice(['fr_CH.UTF-8', 'es_ES', 'ru_RU.CP1251', 'kk_KZ.RK1048', 'zh_CN'])
+ new_experiment = add(add(add(env.experiment, 'LANG', loc), 'LC_ALL', loc), 'LANGUAGE', '%s:fr' % loc)
return script, Pair(new_control, new_experiment), tree
# TODO: Linux-specific. unshare --uts requires superuser privileges.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list