9 # published by the Free Software Foundation.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 ##
27 ## @test
28 ## @summary Test JNI Global Refs with Shenandoah
29 ## @run shell/timeout=480 TestJNIGlobalRefs.sh
30 ##
31
32 if [ "${TESTSRC}" = "" ]
33 then
34 TESTSRC=${PWD}
35 echo "TESTSRC not set. Using "${TESTSRC}" as default"
36 fi
37 echo "TESTSRC=${TESTSRC}"
38 ## Adding common setup Variables for running shell tests.
39 . ${TESTSRC}/../../../test_env.sh
40
41 # set platform-dependent variables
42 if [ "$VM_OS" = "linux" ]; then
43 echo "Testing on linux"
44 gcc_cmd=`which gcc`
45 if [ "x$gcc_cmd" = "x" ]; then
46 echo "WARNING: gcc not found. Cannot execute test." 2>&1
47 exit 0;
48 fi
49 else
59 $gcc_cmd -O1 -DLINUX -fPIC -shared \
60 -o ${THIS_DIR}${FS}libTestJNIGlobalRefs.so \
61 -I${TESTJAVA}${FS}include \
62 -I${TESTJAVA}${FS}include${FS}linux \
63 ${TESTSRC}${FS}libTestJNIGlobalRefs.c
64
65 # run the java test in the background
66 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahVerify \
67 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
68
69 echo "$cmd"
70 eval $cmd
71
72 if [ $? -ne 0 ]
73 then
74 echo "Test Failed"
75 exit 1
76 fi
77
78 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive \
79 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
80
81 echo "$cmd"
82 eval $cmd
83
84 if [ $? -ne 0 ]
85 then
86 echo "Test Failed"
87 exit 1
88 fi
89
|
9 # published by the Free Software Foundation.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 ##
27 ## @test
28 ## @summary Test JNI Global Refs with Shenandoah
29 ## @run shell/timeout=720 TestJNIGlobalRefs.sh
30 ##
31
32 if [ "${TESTSRC}" = "" ]
33 then
34 TESTSRC=${PWD}
35 echo "TESTSRC not set. Using "${TESTSRC}" as default"
36 fi
37 echo "TESTSRC=${TESTSRC}"
38 ## Adding common setup Variables for running shell tests.
39 . ${TESTSRC}/../../../test_env.sh
40
41 # set platform-dependent variables
42 if [ "$VM_OS" = "linux" ]; then
43 echo "Testing on linux"
44 gcc_cmd=`which gcc`
45 if [ "x$gcc_cmd" = "x" ]; then
46 echo "WARNING: gcc not found. Cannot execute test." 2>&1
47 exit 0;
48 fi
49 else
59 $gcc_cmd -O1 -DLINUX -fPIC -shared \
60 -o ${THIS_DIR}${FS}libTestJNIGlobalRefs.so \
61 -I${TESTJAVA}${FS}include \
62 -I${TESTJAVA}${FS}include${FS}linux \
63 ${TESTSRC}${FS}libTestJNIGlobalRefs.c
64
65 # run the java test in the background
66 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahVerify \
67 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
68
69 echo "$cmd"
70 eval $cmd
71
72 if [ $? -ne 0 ]
73 then
74 echo "Test Failed"
75 exit 1
76 fi
77
78 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive \
79 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
80
81 echo "$cmd"
82 eval $cmd
83
84 if [ $? -ne 0 ]
85 then
86 echo "Test Failed"
87 exit 1
88 fi
89
90 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahVerify \
91 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
92
93 echo "$cmd"
94 eval $cmd
95
96 if [ $? -ne 0 ]
97 then
98 echo "Test Failed"
99 exit 1
100 fi
101
102 cmd="${TESTJAVA}${FS}bin${FS}java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=passive \
103 -Djava.library.path=${THIS_DIR}${FS} TestJNIGlobalRefs"
104
105 echo "$cmd"
106 eval $cmd
107
108 if [ $? -ne 0 ]
109 then
110 echo "Test Failed"
111 exit 1
112 fi
113
|