jdk/test/tools/launcher/ChangeDataModel.sh
author never
Mon, 12 Jul 2010 22:27:18 -0700
changeset 5926 a36f90d986b6
parent 5506 202f599c92aa
child 7668 d4a77089c587
permissions -rw-r--r--
6968385: malformed xml in sweeper logging Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
     2
# Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    21
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
# @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
# @bug 4894330 4810347 6277269
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
# @run shell ChangeDataModel.sh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# @summary Verify -d32 and -d64 options are accepted(rejected) on all platforms 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# @author Joseph D. Darcy
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
OS=`uname -s`;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    32
# To remove CR from output, needed for java apps in CYGWIN, harmless otherwise
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    33
SED_CR="sed -e s@\\r@@g"
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    34
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
case "$OS" in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
	Windows* | CYGWIN* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
	  PATHSEP=";"
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
	  PATHSEP=":"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# Verify directory context variables are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
if [ "${TESTJAVA}" = "" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
  echo "TESTJAVA not set.  Test cannot execute.  Failed."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
if [ "${TESTSRC}" = "" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
  echo "TESTSRC not set.  Test cannot execute.  Failed."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
if [ "${TESTCLASSES}" = "" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# Construct paths to default Java executables
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
JAVA="$TESTJAVA/bin/java -classpath $TESTCLASSES${PATHSEP}."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
JAVAC="$TESTJAVA/bin/javac"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# Create our little Java test on the fly
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
( printf "public class GetDataModel {"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
  printf "   public static void main(String argv[]) {"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
  printf "      System.out.println(System.getProperty(\"sun.arch.data.model\", \"none\"));"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
  printf "   }"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  printf "}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
) > GetDataModel.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
$JAVAC GetDataModel.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
# All preconditions are met; run the tests.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
# Verify data model flag for default data model is accepted
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    85
DM=`$JAVA GetDataModel | ${SED_CR}`
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
case "$DM" in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        32 )
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    88
		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
		if [ "${DM2}" != "32" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
	  	echo "Data model flag -d32 not accepted or had improper effect."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
	  	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        64 )
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    97
		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
		if [ "${DM2}" != "64" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
	  	echo "Data model flag -d64 not accepted or had improper effect."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
	  	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
	* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
		echo "Unrecognized data model: $DM"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
# Determine if platform might be dual-mode capable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
case "$OS" in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
	SunOS )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
		# ARCH should be sparc or i386
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
		ARCH=`uname -p`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
		case "${ARCH}" in 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
			sparc )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
			DUALMODE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
			PATH64=sparcv9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
			i386 )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
			DUALMODE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
			PATH64=amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
			* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
			DUALMODE=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
		esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
	Linux )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
		# ARCH should be ia64, x86_64, or i*86
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
		ARCH=`uname -m`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
		case "${ARCH}" in 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
			ia64 )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
			DUALMODE=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
			x86_64 )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
			DUALMODE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
			PATH64=amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
			* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
			DUALMODE=false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
		esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
	Windows* | CYGWIN* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
		ARCH=`uname -m`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
		case "${ARCH}" in 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
			* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
			DUALMODE=false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
			;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
		esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
	* )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
		echo "Warning: unknown environment."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
		DUALMODE=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
	;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
if [ "${DUALMODE}" = "true" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
	# Construct path to 64-bit Java executable, might not exist
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
	JAVA64FILE="${TESTJAVA}/bin/${PATH64}/java"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
	JAVA64="${JAVA64FILE} -classpath ${TESTCLASSES}${PATHSEP}."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
	if [ -f ${JAVA64FILE} ]; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
		# Verify that, at least on Solaris, only one exec is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
		# used to change data models
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
		if [ "${OS}" = "SunOS" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
			rm -f truss.out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
			truss -texec ${JAVA} -d64 GetDataModel > /dev/null 2> truss.out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
			execCount=`grep -c execve truss.out`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
			if [ "${execCount}" -gt 2 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
			then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
				echo "Maximum exec count of 2 exceeded: got $execCount."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
				exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
			fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
			rm -f truss.out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
			truss -texec ${JAVA64} -d32 GetDataModel > /dev/null 2> truss.out
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
			execCount=`grep -c execve truss.out`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
			if [ "${execCount}" -gt 2 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
			then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
				echo "Maximum exec count of 2 exceeded: got $execCount."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
				exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
			fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
		DM2=`${JAVA} -d64 GetDataModel`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
		if [ "${DM2}" != "64" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
		  echo "Data model flag -d64 not accepted or had improper effect."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
		  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
		DM2=`${JAVA64} GetDataModel`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
		if [ "${DM2}" != "64" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
		  echo "Improper data model returned."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
		  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
		DM2=`${JAVA64} -d64 GetDataModel`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
		if [ "${DM2}" != "64" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
		  echo "Data model flag -d64 not accepted or had improper effect."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
		  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
		DM2=`${JAVA64} -d32 GetDataModel`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
		if [ "${DM2}" != "32" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
		  echo "Data model flag -d32 not accepted or had improper effect."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
		  exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
	else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
	  echo "Warning: no 64-bit components found; only one data model tested."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
	fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
# Negative tests for non-dual mode platforms to ensure the other data model is 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
# rejected
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
   233
	DM=`$JAVA GetDataModel | ${SED_CR}`
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
	case "$DM" in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
	   32 )
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
   236
		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
		if [ "x${DM2}" != "x" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
		then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
		   echo "Data model flag -d64 was accepted."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
		   exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
           ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
	   64 )
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
   245
		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
		if [ "x${DM2}" != "x" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
		  then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
		    echo "Data model flag -d32 was accepted."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
	  	    exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
		fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
	   ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
	   * )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
		echo "Unrecognized data model: $DM"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
        	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
	   ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
exit 0;