ChangeDataModel.sh revision 0
553N/A# Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 553N/A# published by the Free Software Foundation. 553N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A# CA 95054 USA or visit www.sun.com if you need additional information or 0N/A# @bug 4894330 4810347 6277269 0N/A# @summary Verify -d32 and -d64 options are accepted(rejected) on all platforms 538N/A# @author Joseph D. Darcy 538N/A# Verify directory context variables are set 538N/Aif [
"${TESTJAVA}" =
"" ]
538N/A echo "TESTJAVA not set. Test cannot execute. Failed." 538N/Aif [
"${TESTSRC}" =
"" ]
538N/A echo "TESTSRC not set. Test cannot execute. Failed." 0N/Aif [
"${TESTCLASSES}" =
"" ]
0N/A echo "TESTCLASSES not set. Test cannot execute. Failed." 0N/A# Construct paths to default Java executables 538N/A# Create our little Java test on the fly 0N/A# All preconditions are met; run the tests. 0N/A# Verify data model flag for default data model is accepted 0N/A if [
"${DM2}" !=
"32" ]
538N/A echo "Data model flag -d32 not accepted or had improper effect." 538N/A if [
"${DM2}" !=
"64" ]
538N/A echo "Data model flag -d64 not accepted or had improper effect." 0N/A# Determine if platform might be dual-mode capable. 0N/A # ARCH should be sparc or i386 # ARCH should be ia64, x86_64, or i*86 echo "Warning: unknown environment." if [
"${DUALMODE}" =
"true" ]
# Construct path to 64-bit Java executable, might not exist JAVA64=
"${JAVA64FILE} -classpath ${TESTCLASSES}${PATHSEP}." # Verify that, at least on Solaris, only one exec is # used to change data models if [
"${execCount}" -
gt 2 ]
echo "Maximum exec count of 2 exceeded: got $execCount." if [
"${execCount}" -
gt 2 ]
echo "Maximum exec count of 2 exceeded: got $execCount." echo "Data model flag -d64 not accepted or had improper effect." echo "Improper data model returned." echo "Data model flag -d64 not accepted or had improper effect." echo "Data model flag -d32 not accepted or had improper effect." echo "Warning: no 64-bit components found; only one data model tested." # Negative tests for non-dual mode platforms to ensure the other data model is echo "Data model flag -d64 was accepted." echo "Data model flag -d32 was accepted." echo "Unrecognized data model: $DM"