Test.sh revision 6073:cea72c2bf071
1#! /bin/sh 2 3# 4# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6# 7# This code is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License version 2 only, as 9# published by the Free Software Foundation. 10# 11# This code is distributed in the hope that it will be useful, but WITHOUT 12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14# version 2 for more details (a copy is included in the LICENSE file that 15# accompanied this code). 16# 17# You should have received a copy of the GNU General Public License version 18# 2 along with this work; if not, write to the Free Software Foundation, 19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20# 21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22# or visit www.oracle.com if you need additional information or have any 23# questions. 24# 25 26# @test 1.1, 02/14/01 27# @author Ram Marti 28# @bug 4399067 29# @summary Subject.doAs(null, action) does not clear the executing 30# 31# ${TESTJAVA} is pointing to the jre 32# 33# set platform-dependent variables 34OS=`uname -s` 35case "$OS" in 36 SunOS ) 37 PS=":" 38 FS="/" 39 RM="/bin/rm -f" 40 ;; 41 Linux ) 42 PS=":" 43 FS="/" 44 RM="/bin/rm -f" 45 ;; 46 Darwin ) 47 PS=":" 48 FS="/" 49 RM="/bin/rm -f" 50 ;; 51 CYGWIN* ) 52 PS=";" 53 FS="/" 54 RM="rm" 55 ;; 56 Windows* ) 57 PS=";" 58 FS="\\" 59 RM="rm" 60 ;; 61 * ) 62 echo "Unrecognized system!" 63 exit 1; 64 ;; 65esac 66# remove any leftover built class 67cd ${TESTCLASSES}${FS} 68${RM} Test.class 69${TESTJAVA}${FS}bin${FS}javac -d ${TESTCLASSES}${FS} ${TESTSRC}${FS}Test.java 70WD=`pwd` 71cd ${TESTSRC}${FS} 72cd $WD 73echo $WD 74${TESTJAVA}${FS}bin${FS}java -classpath "${TESTCLASSES}${FS}" \ 75-Djava.security.manager \ 76-Djava.security.policy=${TESTSRC}${FS}policy \ 77Test 78 79exit $? 80