changeset 14673:3e0c4e45bd5f

8192953: sun/management/jmxremote/bootstrap/*.sh tests fail with error : revokeall.exe: Permission denied Reviewed-by: cjplummer
author hb
date Thu, 28 Jun 2018 09:40:46 +0530
parents 8310f9fb8d93
children fb9d9cfd0523
files test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Thu Aug 13 07:37:37 2020 +0100
+++ b/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Thu Jun 28 09:40:46 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -34,13 +34,12 @@
 OS=`uname -s`
 UMASK=`umask`
 
-case $OS in
-CYGWIN_NT*)
+if [[ $OS == CYGWIN_NT* ]] ; then
     OS="Windows_NT"
     if [ -z "$SystemRoot" ] ;  then
-        SystemRoot=$SYSTEMROOT
+        SystemRoot=`cygpath $SYSTEMROOT`
     fi
-esac
+fi
 
 case $OS in
 SunOS | Linux | Darwin | AIX )
@@ -70,17 +69,17 @@
     if [ "$OS" = "Windows_NT" ]; then
         USER=`id -u -n`
         CACLS="$SystemRoot/system32/cacls.exe"
-        REVOKEALL="${TESTSRC}/../../windows/revokeall.exe"
+        TEST_SRC=`cygpath ${TESTSRC}`
+        REVOKEALL="$TEST_SRC/../../windows/revokeall.exe"
         if [ ! -f "$REVOKEALL" ] ; then
             echo "$REVOKEALL missing"
             exit 1
         fi
+        chmod ug+x $REVOKEALL
     fi
-
-
     ;;
 *)
-    echo "Unrecognized system!"
+    echo "Unrecognized system! $OS"
     exit 1
     ;;
 esac