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