summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib')
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 96fab44408..673c1ab3bd 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
-## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2020 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the release tools of the Qt Toolkit.
@@ -263,7 +263,7 @@ def baseEnv(platname=None,
keep += preserveLib
cached = dict(
- LC_ALL = 'C', # Use standard locale
+ LC_ALL = 'en-US.UTF-8', # Use standard locale
# Avoid interference from any qtlogging.ini files, e.g. in
# /etc/xdg/QtProject/, (must match tst_selftests.cpp's
# processEnvironment()'s value):
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 84090c22ca..53c35dad65 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -632,6 +632,11 @@ static QProcessEnvironment processEnvironment()
result.insert(QStringLiteral("QT_LOGGING_RULES"),
// Must match generate_expected_output.py's main()'s value:
QStringLiteral("*.debug=true;qt.*=false"));
+
+#if defined(Q_OS_UNIX)
+ // avoid the warning from QCoreApplication
+ result.insert(QStringLiteral("LC_ALL"), QStringLiteral("en_US.UTF-8"));
+#endif
}
return result;
}