#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# @test Test7110720.sh
# @bug 7110720
# @summary improve VM configuration file loading
# @run shell Test7110720.sh
#
if [ "${TESTSRC}" = "" ]
then
fi
echo "TESTSRC=${TESTSRC}"
## Adding common setup Variables for running shell tests.
. ${TESTSRC}/../../test_env.sh
# Jtreg sets TESTVMOPTS which may include -d64 which is
# required to test a 64-bit JVM on some platforms.
# we can recognise that.
# set platform-dependent variables
FS="/"
## for solaris, linux it's HOME
then
TESTVMOPTS=`cat ${FILE_LOCATION}${FS}JDK64BIT`
fi
;;
Windows_* )
FS="\\"
;;
CYGWIN_* )
FS="/"
;;
* )
echo "Unrecognized system!"
exit 1;
;;
esac
# Don't test debug builds, they do read the config files:
if [ "$?" = "0" ]; then
exit 0
fi
if [ "$?" = "0" ]; then
echo "FAILED: base case failure"
exit 1
fi
echo "garbage in, garbage out" > .hotspot_compiler
if [ "$?" = "0" ]; then
echo "FAILED: .hotspot_compiler was read"
fi
${JAVA} ${TESTVMOPTS} -XX:CompileCommandFile=hs_comp.txt -version 2>&1 | grep "garbage in" >/dev/null
if [ "$?" = "1" ]; then
echo "FAILED: explicit compiler command file not read"
fi
echo "garbage" > .hotspotrc
if [ "$?" = "0" ]; then
echo "FAILED: .hotspotrc was read"
fi
if [ "$?" = "1" ]; then
echo "FAILED: explicit flags file not read"
fi
if [ "${ok}" = "no" ]; then
echo "Some tests failed."
exit 1
else
echo "Passed"
exit 0
fi