test/tools/javac/T5090006/compiler.sh
author ohair
Wed Dec 22 20:12:27 2010 -0800 (2 years ago)
changeset 112 38d07d25ab65
parent 86d5ba92698ff5
permissions -rw-r--r--
6962318: Update copyright year
Reviewed-by: andrew
duke@0
#!/bin/sh
duke@0
duke@0
#
ohair@112
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0
#
duke@0
# This code is free software; you can redistribute it and/or modify it
duke@0
# under the terms of the GNU General Public License version 2 only, as
duke@0
# published by the Free Software Foundation.
duke@0
#
duke@0
# This code is distributed in the hope that it will be useful, but WITHOUT
duke@0
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
duke@0
# version 2 for more details (a copy is included in the LICENSE file that
duke@0
# accompanied this code).
duke@0
#
duke@0
# You should have received a copy of the GNU General Public License version
duke@0
# 2 along with this work; if not, write to the Free Software Foundation,
duke@0
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0
#
ohair@86
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@86
# or visit www.oracle.com if you need additional information or have any
ohair@86
# questions.
duke@0
#
duke@0
duke@0
duke@0
if [ "${TESTSRC}" = "" ]
duke@0
then
duke@0
  echo "TESTSRC not set.  Test cannot execute.  Failed."
duke@0
  exit 1
duke@0
fi
duke@0
echo "TESTSRC=${TESTSRC}"
duke@0
if [ "${TESTJAVA}" = "" ]
duke@0
then
duke@0
  echo "TESTJAVA not set.  Test cannot execute.  Failed."
duke@0
  exit 1
duke@0
fi
duke@0
echo "TESTJAVA=${TESTJAVA}"
duke@0
if [ "${TESTCLASSES}" = "" ]
duke@0
then
duke@0
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
duke@0
  exit 1
duke@0
fi
duke@0
echo "TESTCLASSES=${TESTCLASSES}"
duke@0
echo "CLASSPATH=${CLASSPATH}"
duke@0
duke@0
# set platform-dependent variables
duke@0
OS=`uname -s`
duke@0
case "$OS" in
jjg@59
  SunOS | Linux | CYGWIN* )
duke@0
    FS="/"
duke@0
    ;;
duke@0
  Windows* )
duke@0
    FS="\\"
duke@0
    ;;
duke@0
  * )
duke@0
    echo "Unrecognized system!"
duke@0
    exit 1;
duke@0
    ;;
duke@0
esac
duke@0
andrew@77
"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -verbose -d "${TESTCLASSES}" -cp "${TESTSRC}${FS}broken.jar" "${TESTSRC}${FS}$1"
duke@0
duke@0
result=$?
duke@0
duke@0
if [ $result -eq 0 ]
duke@0
then
duke@0
  echo "Passed"
duke@0
else
duke@0
  echo "Failed"
duke@0
fi
duke@0
exit $result