Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/util/ResourceBundle/Bug6299235Test.sh
38812 views
#!/bin/sh1# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#22#!/bin/sh23#24# @test25# @bug 629923526# @summary test Bug 6299235 to make sure the third-party provided sun resources could be picked up.27# @build Bug6299235Test28# @run shell Bug6299235Test.sh2930# set platform-dependent variables31OS=`uname -s`32case "$OS" in33SunOS | Linux | Darwin | AIX )34PATHSEP=":"35FILESEP="/"36;;37Windows* | CYGWIN* )38PATHSEP=";"39FILESEP="\\"40;;41* )42echo "${OS} is unrecognized system!"43exit 1;44;;45esac4647if [ -z "${TESTSRC}" ]; then48echo "TESTSRC undefined: defaulting to ."49TESTSRC=.50fi5152if [ -z "${TESTJAVA}" ]; then53echo "TESTJAVA undefined: can't continue."54exit 155fi5657# See if TESTJAVA points to JRE or JDK58if [ -d "${TESTJAVA}${FILESEP}jre" ]; then59JRE_EXT_DIR=${TESTJAVA}${FILESEP}jre${FILESEP}lib${FILESEP}ext60else61JRE_EXT_DIR=${TESTJAVA}${FILESEP}lib${FILESEP}ext62fi6364if [ -d "${JRE_EXT_DIR}" ]; then65NEW_EXT_DIR="${JRE_EXT_DIR}${PATHSEP}${TESTSRC}"66else67NEW_EXT_DIR=${TESTSRC}68fi6970echo "TESTJAVA=${TESTJAVA}"71echo "TESTSRC=${TESTSRC}"72echo "TESTCLASSES=${TESTCLASSES}"73echo "NEW_EXT_DIR=${NEW_EXT_DIR}"7475cd ${TESTSRC}7677${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTCLASSES} -Djava.ext.dirs=${NEW_EXT_DIR} Bug6299235Test7879if [ $? -ne 0 ]80then81echo "Test fails: exception thrown!"82exit 183fi8485exit 0868788