Mercurial > hg > graal-compiler
comparison test/runtime/7158988/TestFieldMonitor.sh @ 6598:6acee021f5ac
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
author | coleenp |
---|---|
date | Wed, 01 Aug 2012 16:52:43 -0400 |
parents | 037973617842 |
children | 83b6305a5638 |
comparison
equal
deleted
inserted
replaced
6260:5e2dc722e70d | 6598:6acee021f5ac |
---|---|
19 fi | 19 fi |
20 | 20 |
21 # set platform-dependent variables | 21 # set platform-dependent variables |
22 OS=`uname -s` | 22 OS=`uname -s` |
23 case "$OS" in | 23 case "$OS" in |
24 SunOS | Linux ) | 24 SunOS | Linux | Darwin) |
25 NULL=/dev/null | 25 NULL=/dev/null |
26 PS=":" | 26 PS=":" |
27 FS="/" | 27 FS="/" |
28 ;; | 28 ;; |
29 Windows_95 | Windows_98 | Windows_ME ) | 29 Windows_95 | Windows_98 | Windows_ME ) |
50 | 50 |
51 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion | 51 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion |
52 | 52 |
53 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java | 53 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java |
54 | 54 |
55 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 & | 55 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out |
56 | |
57 P_PID=$! | |
58 | |
59 sleep 60 | |
60 STATUS=0 | |
61 | |
62 case "$OS" in | |
63 SunOS | Linux ) | |
64 ps -ef | grep $P_PID | grep -v grep > ${NULL} | |
65 if [ $? = 0 ]; then | |
66 kill -9 $P_PID | |
67 STATUS=1 | |
68 fi | |
69 ;; | |
70 * ) | |
71 ps | grep -i "FieldMonitor" | grep -v grep > ${NULL} | |
72 if [ $? = 0 ]; then | |
73 C_PID=`ps | grep -i "FieldMonitor" | awk '{print $1}'` | |
74 kill -s 9 $C_PID | |
75 STATUS=1 | |
76 fi | |
77 ;; | |
78 esac | |
79 | 56 |
80 grep "A fatal error has been detected" test.out > ${NULL} | 57 grep "A fatal error has been detected" test.out > ${NULL} |
81 if [ $? = 0 ]; then | 58 if [ $? = 0 ]; then |
82 cat test.out | 59 cat test.out |
83 STATUS=1 | 60 STATUS=1 |