Mercurial > hg > truffle
comparison test/runtime/jsig/Test8017498.sh @ 11967:f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
Summary: Added checking for gcc and simplified the sig_handler() in the test case
Reviewed-by: dcubed, coleenp, minqi, dlong
author | ccheung |
---|---|
date | Tue, 30 Jul 2013 14:14:25 -0700 |
parents | 72727c4b6dec |
children | e567d5afd4dd |
comparison
equal
deleted
inserted
replaced
11966:83ca9dc4564d | 11967:f9ee986a9fea |
---|---|
25 | 25 |
26 ## | 26 ## |
27 ## @test Test8017498.sh | 27 ## @test Test8017498.sh |
28 ## @bug 8017498 | 28 ## @bug 8017498 |
29 ## @bug 8020791 | 29 ## @bug 8020791 |
30 ## @bug 8021296 | |
30 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX | 31 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX |
31 ## @run shell/timeout=30 Test8017498.sh | 32 ## @run shell/timeout=30 Test8017498.sh |
32 ## | 33 ## |
33 | 34 |
34 if [ "${TESTSRC}" = "" ] | 35 if [ "${TESTSRC}" = "" ] |
43 # set platform-dependent variables | 44 # set platform-dependent variables |
44 OS=`uname -s` | 45 OS=`uname -s` |
45 case "$OS" in | 46 case "$OS" in |
46 Linux) | 47 Linux) |
47 echo "Testing on Linux" | 48 echo "Testing on Linux" |
49 gcc_cmd=`which gcc` | |
50 if [ "x$gcc_cmd" == "x" ]; then | |
51 echo "WARNING: gcc not found. Cannot execute test." 2>&1 | |
52 exit 0; | |
53 fi | |
48 if [ "$VM_BITS" = "64" ] | 54 if [ "$VM_BITS" = "64" ] |
49 then | 55 then |
50 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so | 56 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so |
51 else | 57 else |
52 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so | 58 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so |
62 THIS_DIR=. | 68 THIS_DIR=. |
63 | 69 |
64 cp ${TESTSRC}${FS}*.java ${THIS_DIR} | 70 cp ${TESTSRC}${FS}*.java ${THIS_DIR} |
65 ${TESTJAVA}${FS}bin${FS}javac *.java | 71 ${TESTJAVA}${FS}bin${FS}javac *.java |
66 | 72 |
67 gcc -DLINUX -fPIC -shared \ | 73 $gcc_cmd -DLINUX -fPIC -shared \ |
68 -o ${TESTSRC}${FS}libTestJNI.so \ | 74 -o ${TESTSRC}${FS}libTestJNI.so \ |
69 -I${TESTJAVA}${FS}include \ | 75 -I${TESTJAVA}${FS}include \ |
70 -I${TESTJAVA}${FS}include${FS}linux \ | 76 -I${TESTJAVA}${FS}include${FS}linux \ |
71 ${TESTSRC}${FS}TestJNI.c | 77 ${TESTSRC}${FS}TestJNI.c |
72 if [ $? != 0 ] | |
73 then | |
74 echo "WARNING: the gcc command failed." 2>&1 | |
75 fi | |
76 | 78 |
77 # run the java test in the background | 79 # run the java test in the background |
78 cmd="LD_PRELOAD=$MY_LD_PRELOAD \ | 80 cmd="LD_PRELOAD=$MY_LD_PRELOAD \ |
79 ${TESTJAVA}${FS}bin${FS}java \ | 81 ${TESTJAVA}${FS}bin${FS}java \ |
80 -Djava.library.path=${TESTSRC}${FS} -server TestJNI 100" | 82 -Djava.library.path=${TESTSRC}${FS} -server TestJNI 100" |