1 #! /bin/sh
   2 
   3 #
   4 # Copyright (c) 2001, 2020, 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
  34 OS=`uname -s`
  35 case "$OS" in
  36   Linux )
  37     PS=":"
  38     FS="/"
  39     RM="/bin/rm -f"
  40     ;;
  41   Darwin )
  42     PS=":"
  43     FS="/"
  44     RM="/bin/rm -f"
  45     ;;
  46   AIX )
  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     ;;
  65 esac
  66 # remove any leftover built class
  67 cd ${TESTCLASSES}${FS}
  68 ${RM} Test.class
  69 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS} \
  70     ${TESTSRC}${FS}Test.java
  71 WD=`pwd`
  72 cd ${TESTSRC}${FS}
  73 cd $WD
  74 echo $WD
  75 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath "${TESTCLASSES}${FS}" \
  76 -Djava.security.manager  \
  77 -Djava.security.policy=${TESTSRC}${FS}policy \
  78 Test
  79 
  80 exit $?