javac.sh revision 553:9d9f26857129
1178476Sjb#!/bin/sh 2178476Sjb 3178476Sjb# 4178476Sjb# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 5178476Sjb# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6178476Sjb# 7178476Sjb# This code is free software; you can redistribute it and/or modify it 8178476Sjb# under the terms of the GNU General Public License version 2 only, as 9178476Sjb# published by the Free Software Foundation. 10178476Sjb# 11178476Sjb# This code is distributed in the hope that it will be useful, but WITHOUT 12178476Sjb# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13178476Sjb# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14178476Sjb# version 2 for more details (a copy is included in the LICENSE file that 15178476Sjb# accompanied this code). 16178476Sjb# 17178476Sjb# You should have received a copy of the GNU General Public License version 18178476Sjb# 2 along with this work; if not, write to the Free Software Foundation, 19178476Sjb# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20178476Sjb# 21178476Sjb# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22178476Sjb# or visit www.oracle.com if you need additional information or have any 23178476Sjb# questions. 24178476Sjb# 25178476Sjb 26178476Sjb# @test 27178476Sjb# @summary Verify basic execution of the javac classes in classes.jar. 28178476Sjb 29178476SjbTESTSRC=${TESTSRC:-.} 30178476SjbTOPDIR=${TESTSRC}/../../.. 31178476SjbTESTJAVAEXE="${TESTJAVA:+${TESTJAVA}/bin/}java" 32178476Sjb 33178476Sjb"${TESTJAVAEXE}" -Xbootclasspath/p:${TOPDIR}/dist/lib/classes.jar \ 34178476Sjb com.sun.tools.javac.Main \ 35178476Sjb -d . "${TESTSRC}"/../HelloWorld.java 36178476Sjb 37178476Sjb"${TESTJAVAEXE}" -classpath . HelloWorld > HelloWorld.tmp 38178476Sjb 39178476Sjbif [ "`cat HelloWorld.tmp`" = "Hello World!" ]; then 40178476Sjb echo "Test passed." 41178476Sjbelse 42178476Sjb echo "Test failed." 43178476Sjb exit 1 44178476Sjbfi 45178476Sjb