annotate test/runtime/7158800/Test7158800.sh @ 6635:83b6305a5638

7191926: Remove MKS dependency in Hotspot regression tests Summary: Add case for CYGWIN in .sh files. Reviewed-by: coleenp, kvn Contributed-by: pavel.punegov@oracle.com
author coleenp
date Wed, 29 Aug 2012 14:49:05 -0400
parents 6acee021f5ac
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6165
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
1 #!/bin/sh
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
2 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
3 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
5 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
6 # This code is free software; you can redistribute it and/or modify it
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
7 # under the terms of the GNU General Public License version 2 only, as
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
8 # published by the Free Software Foundation.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
9 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
10 # This code is distributed in the hope that it will be useful, but WITHOUT
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
13 # version 2 for more details (a copy is included in the LICENSE file that
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
14 # accompanied this code).
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
15 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License version
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
17 # 2 along with this work; if not, write to the Free Software Foundation,
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
19 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
21 # or visit www.oracle.com if you need additional information or have any
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
22 # questions.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
23 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
24 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
25 # Run test for InternTest.java
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
26 #
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
27
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
28 if [ "${TESTSRC}" = "" ]
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
29 then TESTSRC=.
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
30 fi
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
31
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
32 if [ "${TESTJAVA}" = "" ]
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
33 then
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
34 PARENT=`dirname \`which java\``
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
35 TESTJAVA=`dirname ${PARENT}`
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
36 echo "TESTJAVA not set, selecting " ${TESTJAVA}
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
37 echo "If this is incorrect, try setting the variable manually."
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
38 fi
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
39
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
40 if [ "${TESTCLASSES}" = "" ]
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
41 then
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
42 echo "TESTCLASSES not set. Test cannot execute. Failed."
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
43 exit 1
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
44 fi
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
45
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
46 # set platform-dependent variables
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
47 OS=`uname -s`
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
48 case "$OS" in
6598
6acee021f5ac 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 6165
diff changeset
49 SunOS | Linux | Darwin )
6165
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
50 NULL=/dev/null
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
51 PS=":"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
52 FS="/"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
53 ;;
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
54 Windows_* )
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
55 NULL=NUL
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
56 PS=";"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
57 FS="\\"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
58 ;;
6635
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
59 CYGWIN_* )
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
60 NULL=/dev/null
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
61 PS=";"
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
62 FS="/"
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
63 ;;
6165
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
64 * )
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
65 echo "Unrecognized system!"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
66 exit 1;
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
67 ;;
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
68 esac
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
69
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
70 JEMMYPATH=${CPAPPEND}
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
71 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
72
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
73 THIS_DIR=`pwd`
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
74
6598
6acee021f5ac 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 6165
diff changeset
75 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
6165
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
76
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
77 ${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
78
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
79 cp ${TESTSRC}${FS}badstrings.txt .
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
80
6598
6acee021f5ac 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 6165
diff changeset
81 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 &
6165
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
82 C_PID=$!
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
83
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
84 sleep 60
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
85
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
86 ps | grep ${C_PID} | grep -v grep
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
87
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
88 if [ $? = 0 ]
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
89 then
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
90 kill -9 ${C_PID}
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
91 echo "Test Failed"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
92 exit 1
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
93 else
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
94 echo "Test Passed"
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
95 exit 0
86e17e45019d 7177307: fix fo CR7158800 doesn't contain Test7158800.sh
coleenp
parents:
diff changeset
96 fi