< prev index next >

test/sun/security/mscapi/AccessKeyStore.sh

Print this page
rev 1541 : 8003890: corelibs test scripts should pass TESTVMOPTS
Reviewed-by: chegar, alanb
Contributed-by: Mark Sheppard <mark.sheppard@oracle.com>


  28 # @bug 6324295
  29 # @requires os.family == "windows"
  30 # @run shell AccessKeyStore.sh
  31 # @summary Confirm that permission must be granted to access keystores.
  32 #
  33 # Run only on non-64-bit Windows platform.
  34 
  35 OS=`uname -s`
  36 case "$OS" in
  37     Windows* | CYGWIN* )
  38 
  39     # 'uname -m' does not give us enough information -
  40     #  should rely on $PROCESSOR_IDENTIFIER (as is done in Defs-windows.gmk),
  41     #  but JTREG does not pass this env variable when executing a shell script.
  42     #
  43     #  execute test program - rely on it to exit if platform unsupported
  44 
  45         ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\AccessKeyStore.java
  46 
  47         echo "Using access.policy..."
  48         ${TESTJAVA}/bin/java \
  49             -Djava.security.manager \
  50             -Djava.security.policy==${TESTSRC}\\access.policy \
  51             AccessKeyStore
  52 
  53         echo "Using noaccess.policy..."
  54         ${TESTJAVA}/bin/java \
  55             -Djava.security.manager \
  56             -Djava.security.policy==${TESTSRC}\\noaccess.policy \
  57             AccessKeyStore -deny
  58 
  59         exit
  60         ;;
  61 
  62     * )
  63         echo "This test is not intended for '$OS' - passing test"
  64         exit 0
  65         ;;
  66 esac
  67 


  28 # @bug 6324295
  29 # @requires os.family == "windows"
  30 # @run shell AccessKeyStore.sh
  31 # @summary Confirm that permission must be granted to access keystores.
  32 #
  33 # Run only on non-64-bit Windows platform.
  34 
  35 OS=`uname -s`
  36 case "$OS" in
  37     Windows* | CYGWIN* )
  38 
  39     # 'uname -m' does not give us enough information -
  40     #  should rely on $PROCESSOR_IDENTIFIER (as is done in Defs-windows.gmk),
  41     #  but JTREG does not pass this env variable when executing a shell script.
  42     #
  43     #  execute test program - rely on it to exit if platform unsupported
  44 
  45         ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\AccessKeyStore.java
  46 
  47         echo "Using access.policy..."
  48         ${TESTJAVA}/bin/java ${TESTVMOPTS} \
  49             -Djava.security.manager \
  50             -Djava.security.policy==${TESTSRC}\\access.policy \
  51             AccessKeyStore
  52 
  53         echo "Using noaccess.policy..."
  54         ${TESTJAVA}/bin/java ${TESTVMOPTS} \
  55             -Djava.security.manager \
  56             -Djava.security.policy==${TESTSRC}\\noaccess.policy \
  57             AccessKeyStore -deny
  58 
  59         exit
  60         ;;
  61 
  62     * )
  63         echo "This test is not intended for '$OS' - passing test"
  64         exit 0
  65         ;;
  66 esac
  67 
< prev index next >