23 # 24 # 25 # 26 # This script builds the test files for the test 27 # but not the actual test sources themselves. 28 # 29 if [ "${TESTSRC}" = "" ] 30 then 31 echo "TESTSRC not set. Test cannot execute. Failed." 32 exit 1 33 fi 34 echo "TESTSRC=${TESTSRC}" 35 36 if [ "${TESTJAVA}" = "" ] 37 then 38 echo "TESTJAVA not set. Test cannot execute. Failed." 39 exit 1 40 fi 41 echo "TESTJAVA=${TESTJAVA}" 42 43 if [ "${TESTCLASSES}" = "" ] 44 then 45 echo "TESTCLASSES not set. Test cannot execute. Failed." 46 exit 1 47 fi 48 49 JAVAC="${TESTJAVA}/bin/javac" 50 JAR="${TESTJAVA}/bin/jar" 51 52 rm -rf ${TESTCLASSES}/test1 53 rm -rf ${TESTCLASSES}/test2 54 rm -rf ${TESTCLASSES}/serverRoot 55 mkdir -p ${TESTCLASSES}/test1/com/foo 56 mkdir -p ${TESTCLASSES}/test2/com/foo 57 mkdir -p ${TESTCLASSES}/serverRoot 58 59 cd ${TESTSRC}/test1/com/foo 60 cp * ${TESTCLASSES}/test1/com/foo 61 cd ${TESTCLASSES}/test1 62 ${JAVAC} com/foo/*.java 63 ${JAR} cvf ../test1.jar com/foo/*.class com/foo/Resource* 64 65 cd ${TESTSRC}/test2/com/foo 66 cp * ${TESTCLASSES}/test2/com/foo 67 cd ${TESTCLASSES}/test2 68 ${JAVAC} com/foo/*.java 69 ${JAR} cvf ../test2.jar com/foo/*.class com/foo/Resource* 70 71 cp ${TESTSRC}/serverRoot/Test.java ${TESTCLASSES}/serverRoot 72 cd ${TESTCLASSES}/serverRoot 73 ${JAVAC} Test.java | 23 # 24 # 25 # 26 # This script builds the test files for the test 27 # but not the actual test sources themselves. 28 # 29 if [ "${TESTSRC}" = "" ] 30 then 31 echo "TESTSRC not set. Test cannot execute. Failed." 32 exit 1 33 fi 34 echo "TESTSRC=${TESTSRC}" 35 36 if [ "${TESTJAVA}" = "" ] 37 then 38 echo "TESTJAVA not set. Test cannot execute. Failed." 39 exit 1 40 fi 41 echo "TESTJAVA=${TESTJAVA}" 42 43 if [ "${COMPILEJAVA}" = "" ]; then 44 COMPILEJAVA="${TESTJAVA}" 45 fi 46 echo "COMPILEJAVA=${COMPILEJAVA}" 47 48 if [ "${TESTCLASSES}" = "" ] 49 then 50 echo "TESTCLASSES not set. Test cannot execute. Failed." 51 exit 1 52 fi 53 54 JAVAC="${COMPILEJAVA}/bin/javac" 55 JAR="${COMPILEJAVA}/bin/jar" 56 57 rm -rf ${TESTCLASSES}/test1 58 rm -rf ${TESTCLASSES}/test2 59 rm -rf ${TESTCLASSES}/serverRoot 60 mkdir -p ${TESTCLASSES}/test1/com/foo 61 mkdir -p ${TESTCLASSES}/test2/com/foo 62 mkdir -p ${TESTCLASSES}/serverRoot 63 64 cd ${TESTSRC}/test1/com/foo 65 cp * ${TESTCLASSES}/test1/com/foo 66 cd ${TESTCLASSES}/test1 67 ${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} com/foo/*.java 68 ${JAR} ${TESTTOOLVMOPTS} cvf ../test1.jar com/foo/*.class com/foo/Resource* 69 70 cd ${TESTSRC}/test2/com/foo 71 cp * ${TESTCLASSES}/test2/com/foo 72 cd ${TESTCLASSES}/test2 73 ${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} com/foo/*.java 74 ${JAR} ${TESTTOOLVMOPTS} cvf ../test2.jar com/foo/*.class com/foo/Resource* 75 76 cp ${TESTSRC}/serverRoot/Test.java ${TESTCLASSES}/serverRoot 77 cd ${TESTCLASSES}/serverRoot 78 ${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Test.java |