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