test/mips64/11080/test.sh

changeset 9758
122547cfa3c8
equal deleted inserted replaced
9757:a9a6cc2af3e8 9758:122547cfa3c8
1 #!/bin/bash
2
3 #
4 # Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
5 # Copyright (c) 2019, Loongson Technology. All rights reserved.
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7 #
8 # This code is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License version 2 only, as
10 # published by the Free Software Foundation.
11 #
12 # This code is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # version 2 for more details (a copy is included in the LICENSE file that
16 # accompanied this code).
17 #
18 # You should have received a copy of the GNU General Public License version
19 # 2 along with this work; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 # or visit www.oracle.com if you need additional information or have any
24 # questions.
25 #
26
27 ##
28 ## @test test.sh
29 ## @bug 8207838
30 ## @summary Regression test for passing float args to a synchronized jni function.
31 ## @run shell test.sh
32 ##
33
34 if [ "${TESTSRC}" = "" ]
35 then
36 TESTSRC=${PWD}
37 echo "TESTSRC not set. Using "${TESTSRC}" as default"
38 fi
39 echo "TESTSRC=${TESTSRC}"
40 ## Adding common setup Variables for running shell tests.
41 . ${TESTSRC}/../../test_env.sh
42
43 # set platform-dependent variables
44 OS=`uname -s`
45 echo "Testing on " $OS
46 case "$OS" in
47 Linux)
48 cc_cmd=`which gcc`
49 if [ "x$cc_cmd" == "x" ]; then
50 echo "WARNING: gcc not found. Cannot execute test." 2>&1
51 exit 0;
52 fi
53 ;;
54 *)
55 echo "Test passed; only valid for Linux"
56 exit 0;
57 ;;
58 esac
59
60 THIS_DIR=.
61
62 cp ${TESTSRC}${FS}TestFloatSyncJNIArgs.java ${THIS_DIR}
63 ${TESTJAVA}${FS}bin${FS}javac TestFloatSyncJNIArgs.java
64
65 $cc_cmd -fPIC -shared \
66 -o libTestFloatSyncJNIArgs.so \
67 -I${TESTJAVA}${FS}include \
68 -I${TESTJAVA}${FS}include${FS}linux \
69 ${TESTSRC}${FS}libTestFloatSyncJNIArgs.c
70
71 ${TESTJAVA}${FS}bin${FS}java \
72 -Djava.library.path=${THIS_DIR} TestFloatSyncJNIArgs
73
74 exit $?

mercurial