changeset 24020:4cc88e22a4d0

8151722: TESTBUG: New test compiler/native/TestDirtyInt.sh should be modified Summary: Fixed string comparison and indentation Reviewed-by: kvn
author bmoloden
date Fri, 24 Jun 2016 22:09:08 +0300
parents 6021c95f5944
children f22b5be95347
files test/compiler/native/TestDirtyInt.sh
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/native/TestDirtyInt.sh	Tue Jun 14 19:48:30 2016 +0200
+++ b/test/compiler/native/TestDirtyInt.sh	Fri Jun 24 22:09:08 2016 +0300
@@ -30,20 +30,19 @@
 ## @run shell/timeout=30 TestDirtyInt.sh
 ##
 
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
+if [ -z "${TESTSRC}" ]; then
+    TESTSRC="${PWD}"
+    echo "TESTSRC not set.  Using "${TESTSRC}" as default"
 fi
 echo "TESTSRC=${TESTSRC}"
 ## Adding common setup Variables for running shell tests.
 . ${TESTSRC}/../../test_env.sh
 
 # set platform-dependent variables
-if [ $VM_OS == "linux" -a $VM_CPU == "sparcv9" ]; then
+if [ "$VM_OS" = "linux" -a "$VM_CPU" = "sparcv9" ]; then
     echo "Testing on linux-sparc"
     gcc_cmd=`which gcc`
-    if [ "x$gcc_cmd" == "x" ]; then
+    if [ -z "$gcc_cmd" ]; then
         echo "WARNING: gcc not found. Cannot execute test." 2>&1
         exit 0;
     fi
@@ -68,10 +67,9 @@
     -Djava.library.path=${TESTSRC}${FS} TestDirtyInt"
 
 echo "$cmd"
-eval $cmd 
+eval $cmd
 
-if [ $? = 0 ]
-then
+if [ $? = 0 ]; then
     echo "Test Passed"
     exit 0
 fi