Mercurial > hg > truffle
comparison test/runtime/6929067/Test6929067.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 | 04d6d4322c6a |
children | e567d5afd4dd |
comparison
equal
deleted
inserted
replaced
11966:83ca9dc4564d | 11967:f9ee986a9fea |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 ## | 3 ## |
4 ## @test Test6929067.sh | 4 ## @test Test6929067.sh |
5 ## @bug 6929067 | 5 ## @bug 6929067 |
6 ## @bug 8021296 | |
6 ## @summary Stack guard pages should be removed when thread is detached | 7 ## @summary Stack guard pages should be removed when thread is detached |
7 ## @compile T.java | 8 ## @compile T.java |
8 ## @run shell Test6929067.sh | 9 ## @run shell Test6929067.sh |
9 ## | 10 ## |
10 set -x | 11 set -x |
19 | 20 |
20 # set platform-dependent variables | 21 # set platform-dependent variables |
21 OS=`uname -s` | 22 OS=`uname -s` |
22 case "$OS" in | 23 case "$OS" in |
23 Linux) | 24 Linux) |
25 gcc_cmd=`which gcc` | |
26 if [ "x$gcc_cmd" == "x" ]; then | |
27 echo "WARNING: gcc not found. Cannot execute test." 2>&1 | |
28 exit 0; | |
29 fi | |
24 NULL=/dev/null | 30 NULL=/dev/null |
25 PS=":" | 31 PS=":" |
26 FS="/" | 32 FS="/" |
27 ;; | 33 ;; |
28 * ) | 34 * ) |
117 echo "VM type: ${VMTYPE}" | 123 echo "VM type: ${VMTYPE}" |
118 # Note pthread may not be found thus invoke creation will fail to be created. | 124 # Note pthread may not be found thus invoke creation will fail to be created. |
119 # Check to ensure you have a /usr/lib/libpthread.so if you don't please look | 125 # Check to ensure you have a /usr/lib/libpthread.so if you don't please look |
120 # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. | 126 # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. |
121 | 127 |
122 gcc -DLINUX ${COMP_FLAG} -o invoke \ | 128 $gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \ |
123 -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ | 129 -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ |
124 -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ | 130 -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ |
125 -ljvm -lpthread invoke.c | 131 -ljvm -lpthread invoke.c |
126 | 132 |
127 ./invoke | 133 ./invoke |
128 exit $? | 134 exit $? |