hotspot/test/jprt.config
author weijun
Wed, 13 Jun 2012 19:23:23 +0800
changeset 13016 8e43ddef9617
parent 10565 dc90c239f4ec
child 41049 8926ffa4cbc2
permissions -rw-r--r--
7176574: sun/security/krb5/auto/TcpTimeout.java failed with solaris-i586 Reviewed-by: chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#!echo "This is not a shell script"
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# 
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
     4
# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
#
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    23
# questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
# 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
# JPRT shell configuration for testing.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
# Input environment variables:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
#    Windows Only:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
#      PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
#      ROOTDIR
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
# Output variable settings:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
#    make    Full path to GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
# Output environment variables:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
#    PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
# Error
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
error() # message
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  echo "ERROR: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  exit 6
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
# Directory must exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
dirMustExist() # dir name
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  if [ ! -d "$1" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    error "Directory for $2 does not exist: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
# File must exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
fileMustExist() # dir name
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  if [ ! -f "$1" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    error "File for $2 does not exist: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
# Should be set by JPRT as the 3 basic inputs
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
slashjava="${ALT_SLASH_JAVA}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
if [ "${slashjava}" = "" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  slashjava=/java
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
# Check input
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
dirMustExist "${slashjava}"  ALT_SLASH_JAVA
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
osname=`uname -s`
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
    78
case "${osname}" in
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
    79
  SunOS )
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    # SOLARIS: Sparc or X86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    osarch=`uname -p`
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    if [ "${osarch}" = sparc ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
	solaris_arch=sparc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
	solaris_arch=i386
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    # Add basic solaris system paths
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    make=/usr/sfw/bin/gmake
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    if [ ! -f ${make} ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
	make=/opt/sfw/bin/gmake
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
	if [ ! -f ${make} ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
	    make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
        fi 
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    # File creation mask
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
    umask 002
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   103
    ;;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   105
  Linux | Darwin )
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    # Add basic paths
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
    # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    make=/usr/bin/make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    umask 002
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   114
    ;;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   116
  FreeBSD | OpenBSD )
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   117
    # Add basic paths
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   118
    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   119
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   120
    # Find GNU make
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   121
    make=/usr/local/bin/gmake
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   122
    fileMustExist "${make}" make
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   123
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   124
    umask 002
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   125
    ;;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   127
  NetBSD )
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   128
    # Add basic paths
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   129
    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   130
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   131
    # Find GNU make
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   132
    make=/usr/pkg/bin/gmake
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   133
    fileMustExist "${make}" make
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   134
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   135
    umask 002
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   136
    ;;
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   137
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   138
  * )
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
    # Windows: Differs on CYGWIN vs. MKS.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    # We need to determine if we are running a CYGWIN shell or an MKS shell
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    #    (if uname isn't available, then it will be unix_toolset=unknown)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    unix_toolset=unknown
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
    if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
        # We kind of assume ROOTDIR is where MKS is and it's ok
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
        unix_toolset=MKS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
        mkshome=`dosname -s "${ROOTDIR}"`
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
        # Most unix utilities are in the mksnt directory of ROOTDIR
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
        unixcommand_path="${mkshome}/mksnt"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
        path4sdk="${unixcommand_path}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
	devtools_path="${slashjava}/devtools/win32/bin"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
	path4sdk="${devtools_path};${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
        # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
        make="${devtools_path}/gnumake.exe"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
        fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
    elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
        # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
        unix_toolset=CYGWIN
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
        # Most unix utilities are in the /usr/bin
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
        unixcommand_path="/usr/bin"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
        path4sdk="${unixcommand_path}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
        # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
        make="${unixcommand_path}/make.exe"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
        fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
    else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
      echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
    # For windows, it's hard to know where the system is, so we just add this
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
    #    to PATH.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    path4sdk="${slash_path};${PATH}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    # Convert path4sdk to cygwin style
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    if [ "${unix_toolset}" = CYGWIN ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    fi
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   179
    ;;
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 5547
diff changeset
   180
esac
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
# Export PATH setting
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
PATH="${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
export PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185