test/mips64/11080/test.sh

Mon, 25 Nov 2019 15:36:48 +0800

author
huangjia
date
Mon, 25 Nov 2019 15:36:48 +0800
changeset 9758
122547cfa3c8
permissions
-rw-r--r--

#11080 Backport testcase of JDK-8207838 compiler/floatingpoint/TestFloatSyncJNIArgs.java
Reviewed-by: aoqi
Contributed-by: guoge1@huawei.com, huangjia

     1 #!/bin/bash
     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 #
    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 ##
    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
    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
    60 THIS_DIR=.
    62 cp ${TESTSRC}${FS}TestFloatSyncJNIArgs.java ${THIS_DIR}
    63 ${TESTJAVA}${FS}bin${FS}javac TestFloatSyncJNIArgs.java
    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
    71 ${TESTJAVA}${FS}bin${FS}java \
    72    -Djava.library.path=${THIS_DIR} TestFloatSyncJNIArgs
    74 exit $?

mercurial