From 47ba72e757dc44e4cb75937204e44660c4d802d8 Mon Sep 17 00:00:00 2001 From: coleenp Date: Wed, 1 Aug 2012 16:52:43 -0400 Subject: [PATCH] 7129723: MAC: Some regression tests need to recognize Mac OS X platform Summary: Add Darwin like Linux to shell scripts Reviewed-by: kvn, kamg, dholmes --- test/compiler/6894807/Test6894807.sh | 2 +- test/gc/6941923/test6941923.sh | 2 +- test/runtime/6626217/Test6626217.sh | 2 +- test/runtime/6878713/Test6878713.sh | 2 +- test/runtime/6929067/Test6929067.sh | 9 +------- test/runtime/7051189/Xchecksig.sh | 2 +- test/runtime/7110720/Test7110720.sh | 2 +- test/runtime/7158800/Test7158800.sh | 6 +++--- test/runtime/7158988/TestFieldMonitor.sh | 27 ++---------------------- 9 files changed, 12 insertions(+), 42 deletions(-) diff --git a/test/compiler/6894807/Test6894807.sh b/test/compiler/6894807/Test6894807.sh index 2b11733dc..20fee43ea 100644 --- a/test/compiler/6894807/Test6894807.sh +++ b/test/compiler/6894807/Test6894807.sh @@ -21,7 +21,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) NULL=/dev/null PS=":" FS="/" diff --git a/test/gc/6941923/test6941923.sh b/test/gc/6941923/test6941923.sh index 8e108b795..e66419635 100644 --- a/test/gc/6941923/test6941923.sh +++ b/test/gc/6941923/test6941923.sh @@ -9,7 +9,7 @@ ## skip on windows OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) NULL=/dev/null PS=":" FS="/" diff --git a/test/runtime/6626217/Test6626217.sh b/test/runtime/6626217/Test6626217.sh index 96217b516..e7414983b 100644 --- a/test/runtime/6626217/Test6626217.sh +++ b/test/runtime/6626217/Test6626217.sh @@ -49,7 +49,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) NULL=/dev/null PS=":" FS="/" diff --git a/test/runtime/6878713/Test6878713.sh b/test/runtime/6878713/Test6878713.sh index eb2064de2..73d91fc0c 100644 --- a/test/runtime/6878713/Test6878713.sh +++ b/test/runtime/6878713/Test6878713.sh @@ -28,7 +28,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) NULL=/dev/null PS=":" FS="/" diff --git a/test/runtime/6929067/Test6929067.sh b/test/runtime/6929067/Test6929067.sh index 3e624d04e..c08aa6b8f 100644 --- a/test/runtime/6929067/Test6929067.sh +++ b/test/runtime/6929067/Test6929067.sh @@ -27,17 +27,10 @@ case "$OS" in PS=":" FS="/" ;; - SunOS | Windows_* | *BSD) - NULL=NUL - PS=";" - FS="\\" + * ) echo "Test passed; only valid for Linux" exit 0; ;; - * ) - echo "Unrecognized system!" - exit 1; - ;; esac # Choose arch: i386 or amd64 (test is Linux-specific) diff --git a/test/runtime/7051189/Xchecksig.sh b/test/runtime/7051189/Xchecksig.sh index 0bf3fe9f2..b4fbbd7d7 100644 --- a/test/runtime/7051189/Xchecksig.sh +++ b/test/runtime/7051189/Xchecksig.sh @@ -43,7 +43,7 @@ fi OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) FS="/" ;; Windows_* ) diff --git a/test/runtime/7110720/Test7110720.sh b/test/runtime/7110720/Test7110720.sh index c90c054fe..ef13888ee 100644 --- a/test/runtime/7110720/Test7110720.sh +++ b/test/runtime/7110720/Test7110720.sh @@ -37,7 +37,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) FS="/" RM=/bin/rm CP=/bin/cp diff --git a/test/runtime/7158800/Test7158800.sh b/test/runtime/7158800/Test7158800.sh index 2a502346a..781922a3c 100644 --- a/test/runtime/7158800/Test7158800.sh +++ b/test/runtime/7158800/Test7158800.sh @@ -46,7 +46,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin ) NULL=/dev/null PS=":" FS="/" @@ -67,13 +67,13 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH THIS_DIR=`pwd` -${TESTJAVA}${FS}bin${FS}java -fullversion +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion ${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java cp ${TESTSRC}${FS}badstrings.txt . -${TESTJAVA}${FS}bin${FS}java -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 & +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 & C_PID=$! sleep 60 diff --git a/test/runtime/7158988/TestFieldMonitor.sh b/test/runtime/7158988/TestFieldMonitor.sh index c9268f862..cf7fcf393 100644 --- a/test/runtime/7158988/TestFieldMonitor.sh +++ b/test/runtime/7158988/TestFieldMonitor.sh @@ -21,7 +21,7 @@ fi # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux ) + SunOS | Linux | Darwin) NULL=/dev/null PS=":" FS="/" @@ -52,30 +52,7 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java -${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 & - -P_PID=$! - -sleep 60 -STATUS=0 - -case "$OS" in - SunOS | Linux ) - ps -ef | grep $P_PID | grep -v grep > ${NULL} - if [ $? = 0 ]; then - kill -9 $P_PID - STATUS=1 - fi - ;; - * ) - ps | grep -i "FieldMonitor" | grep -v grep > ${NULL} - if [ $? = 0 ]; then - C_PID=`ps | grep -i "FieldMonitor" | awk '{print $1}'` - kill -s 9 $C_PID - STATUS=1 - fi - ;; -esac +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out grep "A fatal error has been detected" test.out > ${NULL} if [ $? = 0 ]; then -- GitLab