Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/locales/run_all_locales.sh
6004 views
1
#! /bin/bash
2
3
#
4
# Copyright (c) 2016, 2020 IBM Corp. and others
5
#
6
# This program and the accompanying materials are made available under
7
# the terms of the Eclipse Public License 2.0 which accompanies this
8
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
# or the Apache License, Version 2.0 which accompanies this distribution and
10
# is available at https://www.apache.org/licenses/LICENSE-2.0.
11
#
12
# This Source Code may also be made available under the following
13
# Secondary Licenses when the conditions for such availability set
14
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
# General Public License, version 2 with the GNU Classpath
16
# Exception [1] and GNU General Public License, version 2 with the
17
# OpenJDK Assembly Exception [2].
18
#
19
# [1] https://www.gnu.org/software/classpath/license.html
20
# [2] http://openjdk.java.net/legal/assembly-exception.html
21
#
22
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
#
24
25
# don't try ZOS xplink and lp64 locales
26
# Various IBM-XXXX code pages cause java.io.UnsupportedEncodingsException on ZOS
27
# see CMVC 189169 and 189170
28
for locale in `locale -a | grep -v -E "xplink|lp64|IBM"`;
29
do
30
# vi_VN.tcvn currently causes problems in SLES10 and 11
31
# see CMVC 188505 and https://bugzilla.linux.ibm.com/show_bug.cgi?id=78610
32
if [[ "$locale" != "vi_VN.tcvn" && \
33
# hy_AM.armsc, ka_GE, ka_GE.georg, tg_TJ, tg_TJ.koi8t currently cause problems on Linux
34
# as of SDK.java7sr1hrt = 20120213_01
35
# see CMVC 188906
36
"$locale" != "Ar_AA" && \
37
"$locale" != "hy_AM.armscii8" && \
38
"$locale" != "ka_GE" && \
39
"$locale" != "ka_GE.georgianps" && \
40
"$locale" != "tg_TJ" && \
41
"$locale" != "tg_TJ.koi8t" ]]; then
42
43
echo
44
echo "Locale: " $locale;
45
46
# also print locale to stderr so it appears with the JAVA errors
47
echo 1>&2;
48
echo "Locale: " $locale 1>&2;
49
50
export LC_ALL=$locale;
51
export LANG=$locale;
52
53
# run first argument and pass remaining arguments
54
output=$($1 "${@:2}" 2>&1) ; result="$?"
55
echo $output
56
if grep -q UnsupportedCharsetException <<< "$output" ; then
57
result=0
58
fi
59
if [ "$result" != 0 ]; then
60
echo "bad return code"
61
fi
62
fi
63
done
64
65