848N/A#!/bin/sh
848N/A#
2362N/A# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
848N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
848N/A#
848N/A# This code is free software; you can redistribute it and/or modify it
848N/A# under the terms of the GNU General Public License version 2 only, as
848N/A# published by the Free Software Foundation.
848N/A#
848N/A# This code is distributed in the hope that it will be useful, but WITHOUT
848N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
848N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
848N/A# version 2 for more details (a copy is included in the LICENSE file that
848N/A# accompanied this code).
848N/A#
848N/A# You should have received a copy of the GNU General Public License version
848N/A# 2 along with this work; if not, write to the Free Software Foundation,
848N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
848N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
848N/A#
848N/A#
848N/A#
848N/A# This script builds the test files for the test
848N/A# but not the actual test sources themselves.
848N/A#
848N/Aif [ "${TESTSRC}" = "" ]
848N/Athen
848N/A echo "TESTSRC not set. Test cannot execute. Failed."
848N/A exit 1
848N/Afi
848N/Aecho "TESTSRC=${TESTSRC}"
848N/A
848N/Aif [ "${TESTJAVA}" = "" ]
848N/Athen
848N/A echo "TESTJAVA not set. Test cannot execute. Failed."
848N/A exit 1
848N/Afi
848N/Aecho "TESTJAVA=${TESTJAVA}"
848N/A
848N/Aif [ "${TESTCLASSES}" = "" ]
848N/Athen
848N/A echo "TESTCLASSES not set. Test cannot execute. Failed."
848N/A exit 1
848N/Afi
848N/A
848N/AJAVAC="${TESTJAVA}/bin/javac"
848N/AJAR="${TESTJAVA}/bin/jar"
848N/A
848N/Arm -rf ${TESTCLASSES}/test1
848N/Arm -rf ${TESTCLASSES}/test2
848N/Arm -rf ${TESTCLASSES}/serverRoot
848N/Amkdir -p ${TESTCLASSES}/test1/com/foo
848N/Amkdir -p ${TESTCLASSES}/test2/com/foo
848N/Amkdir -p ${TESTCLASSES}/serverRoot
848N/A
848N/Acd ${TESTSRC}/test1/com/foo
848N/Acp * ${TESTCLASSES}/test1/com/foo
848N/Acd ${TESTCLASSES}/test1
848N/A${JAVAC} com/foo/*.java
848N/A${JAR} cvf ../test1.jar com/foo/*.class com/foo/Resource*
848N/A
848N/Acd ${TESTSRC}/test2/com/foo
848N/Acp * ${TESTCLASSES}/test2/com/foo
848N/Acd ${TESTCLASSES}/test2
848N/A${JAVAC} com/foo/*.java
848N/A${JAR} cvf ../test2.jar com/foo/*.class com/foo/Resource*
848N/A
848N/Acp ${TESTSRC}/serverRoot/Test.java ${TESTCLASSES}/serverRoot
848N/Acd ${TESTCLASSES}/serverRoot
848N/A${JAVAC} Test.java