Path: blob/master/test/functional/cmdLineTests/locales/run_all_locales.sh
6004 views
#! /bin/bash12#3# Copyright (c) 2016, 2020 IBM Corp. and others4#5# This program and the accompanying materials are made available under6# the terms of the Eclipse Public License 2.0 which accompanies this7# distribution and is available at https://www.eclipse.org/legal/epl-2.0/8# or the Apache License, Version 2.0 which accompanies this distribution and9# is available at https://www.apache.org/licenses/LICENSE-2.0.10#11# This Source Code may also be made available under the following12# Secondary Licenses when the conditions for such availability set13# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU14# General Public License, version 2 with the GNU Classpath15# Exception [1] and GNU General Public License, version 2 with the16# OpenJDK Assembly Exception [2].17#18# [1] https://www.gnu.org/software/classpath/license.html19# [2] http://openjdk.java.net/legal/assembly-exception.html20#21# 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-exception22#2324# don't try ZOS xplink and lp64 locales25# Various IBM-XXXX code pages cause java.io.UnsupportedEncodingsException on ZOS26# see CMVC 189169 and 18917027for locale in `locale -a | grep -v -E "xplink|lp64|IBM"`;28do29# vi_VN.tcvn currently causes problems in SLES10 and 1130# see CMVC 188505 and https://bugzilla.linux.ibm.com/show_bug.cgi?id=7861031if [[ "$locale" != "vi_VN.tcvn" && \32# hy_AM.armsc, ka_GE, ka_GE.georg, tg_TJ, tg_TJ.koi8t currently cause problems on Linux33# as of SDK.java7sr1hrt = 20120213_0134# see CMVC 18890635"$locale" != "Ar_AA" && \36"$locale" != "hy_AM.armscii8" && \37"$locale" != "ka_GE" && \38"$locale" != "ka_GE.georgianps" && \39"$locale" != "tg_TJ" && \40"$locale" != "tg_TJ.koi8t" ]]; then4142echo43echo "Locale: " $locale;4445# also print locale to stderr so it appears with the JAVA errors46echo 1>&2;47echo "Locale: " $locale 1>&2;4849export LC_ALL=$locale;50export LANG=$locale;5152# run first argument and pass remaining arguments53output=$($1 "${@:2}" 2>&1) ; result="$?"54echo $output55if grep -q UnsupportedCharsetException <<< "$output" ; then56result=057fi58if [ "$result" != 0 ]; then59echo "bad return code"60fi61fi62done636465