提交 685a153e 编写于 作者: C coleenp

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
上级 cc3fd42d
...@@ -21,7 +21,7 @@ fi ...@@ -21,7 +21,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
## skip on windows ## skip on windows
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
......
...@@ -49,7 +49,7 @@ fi ...@@ -49,7 +49,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
......
...@@ -28,7 +28,7 @@ fi ...@@ -28,7 +28,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
......
...@@ -27,17 +27,10 @@ case "$OS" in ...@@ -27,17 +27,10 @@ case "$OS" in
PS=":" PS=":"
FS="/" FS="/"
;; ;;
SunOS | Windows_* | *BSD) * )
NULL=NUL
PS=";"
FS="\\"
echo "Test passed; only valid for Linux" echo "Test passed; only valid for Linux"
exit 0; exit 0;
;; ;;
* )
echo "Unrecognized system!"
exit 1;
;;
esac esac
# Choose arch: i386 or amd64 (test is Linux-specific) # Choose arch: i386 or amd64 (test is Linux-specific)
......
...@@ -43,7 +43,7 @@ fi ...@@ -43,7 +43,7 @@ fi
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
FS="/" FS="/"
;; ;;
Windows_* ) Windows_* )
......
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
FS="/" FS="/"
RM=/bin/rm RM=/bin/rm
CP=/bin/cp CP=/bin/cp
......
...@@ -46,7 +46,7 @@ fi ...@@ -46,7 +46,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
...@@ -67,13 +67,13 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH ...@@ -67,13 +67,13 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
THIS_DIR=`pwd` 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 ${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java
cp ${TESTSRC}${FS}badstrings.txt . 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=$! C_PID=$!
sleep 60 sleep 60
......
...@@ -21,7 +21,7 @@ fi ...@@ -21,7 +21,7 @@ fi
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux | Darwin)
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
...@@ -52,30 +52,7 @@ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion ...@@ -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}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 & ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
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
grep "A fatal error has been detected" test.out > ${NULL} grep "A fatal error has been detected" test.out > ${NULL}
if [ $? = 0 ]; then if [ $? = 0 ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册