test/jdk/jprt.config
author rbackman
Thu, 18 Jan 2018 19:21:11 +0100
changeset 48809 a81c930a8838
parent 47216 71c04702a3d5
permissions -rw-r--r--
8191915: JCK tests produce incorrect results with C2 Reviewed-by: thartmann, vlivanov, goetz
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
41107
567f832618d7 8165161: Solaris: /usr/ccs /opt/sfw and /opt/csw are dead, references should be expunged
alanbur
parents: 5506
diff changeset
    85
    path4sdk=/usr/bin:/usr/gnu/bin
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    # Find GNU make
41107
567f832618d7 8165161: Solaris: /usr/ccs /opt/sfw and /opt/csw are dead, references should be expunged
alanbur
parents: 5506
diff changeset
    88
    make=/usr/bin/gmake
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    if [ ! -f ${make} ] ; then
41107
567f832618d7 8165161: Solaris: /usr/ccs /opt/sfw and /opt/csw are dead, references should be expunged
alanbur
parents: 5506
diff changeset
    90
	make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    fileMustExist "${make}" make
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    # File creation mask
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    umask 002
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
elif [ "${osname}" = Linux ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
   
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    # Add basic paths
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    # Find GNU make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    make=/usr/bin/make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    fileMustExist "${make}" make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    umask 002
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    # Windows: Differs on CYGWIN vs. MKS.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    # We need to determine if we are running a CYGWIN shell or an MKS shell
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    #    (if uname isn't available, then it will be unix_toolset=unknown)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    unix_toolset=unknown
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        # We kind of assume ROOTDIR is where MKS is and it's ok
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        unix_toolset=MKS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        mkshome=`dosname -s "${ROOTDIR}"`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        # Most unix utilities are in the mksnt directory of ROOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        unixcommand_path="${mkshome}/mksnt"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        path4sdk="${unixcommand_path}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
	devtools_path="${slashjava}/devtools/win32/bin"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
	path4sdk="${devtools_path};${path4sdk}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        # Find GNU make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        make="${devtools_path}/gnumake.exe"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        fileMustExist "${make}" make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        unix_toolset=CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        # Most unix utilities are in the /usr/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        unixcommand_path="/usr/bin"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        path4sdk="${unixcommand_path}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        # Find GNU make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        make="${unixcommand_path}/make.exe"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        fileMustExist "${make}" make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
      echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    # For windows, it's hard to know where the system is, so we just add this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    #    to PATH.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    path4sdk="${slash_path};${PATH}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    # Convert path4sdk to cygwin style
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    if [ "${unix_toolset}" = CYGWIN ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
# Export PATH setting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
PATH="${path4sdk}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
export PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156