summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/data/create-test-packages.sh11
-rw-r--r--tests/tests.pro5
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/data/create-test-packages.sh b/tests/data/create-test-packages.sh
index 9f621f46..71741939 100755
--- a/tests/data/create-test-packages.sh
+++ b/tests/data/create-test-packages.sh
@@ -43,11 +43,12 @@ isMac=0
# unconditionally in the build environment, overriding a potentially valid $LANG setting.
[ "$LC_ALL" = "C" ] && { echo "WARNING: unsetting \$LC_ALL, since it is set to \"C\" (most likely by a wrapper script or QtCreator)"; unset LC_ALL; }
-# let the c-library resolve all the indirect settings
-eval "x$(locale | grep LC_CTYPE= | head -n1)"
-
-# now check for character encoding
-[ "${xLC_CTYPE%%UTF-8}" = "$xLC_CTYPE" ] && { echo "The appman-packager needs to be run within an UTF-8 locale variant"; exit 1; }
+# set a well-known UTF-8 locale: C.UTF-8 is the obvious choice, but macOS doesn't support it
+if [ "$isMac" = "1" ]; then
+ export LC_ALL=en_US.UTF-8
+else
+ export LC_ALL=C.UTF-8
+fi
. utilities.sh
diff --git a/tests/tests.pro b/tests/tests.pro
index 808c386a..1f8e0284 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -39,13 +39,10 @@ OTHER_FILES += \
qtPrepareTool(APPMAN_PACKAGER, appman-packager)
unix {
- macos:ctype=UTF-8
- else:ctype=C.UTF-8
-
# create test data on the fly - this is needed for the CI server
testdata.target = testdata
testdata.depends = $$PWD/data/create-test-packages.sh $$APPMAN_PACKAGER_EXE
- testdata.commands = (cd $$PWD/data ; LC_CTYPE=$$ctype ./create-test-packages.sh $$APPMAN_PACKAGER)
+ testdata.commands = (cd $$PWD/data ; ./create-test-packages.sh $$APPMAN_PACKAGER)
QMAKE_EXTRA_TARGETS += testdata
# qmake would create a default check target implicitly, but since we need 'testdata' as an