hotspot/test/runtime/7158988/TestFieldMonitor.sh
author coleenp
Wed, 01 Aug 2012 16:52:43 -0400
changeset 13469 9a2973794d8c
parent 12729 684b5857e506
child 13523 6a7f3e56a242
permissions -rw-r--r--
7129723: MAC: Some regression tests need to recognize Mac OS X platform Summary: Add Darwin like Linux to shell scripts Reviewed-by: kvn, kamg, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12366
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     1
#!/bin/sh
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     2
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     3
if [ "${TESTSRC}" = "" ]
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     4
then TESTSRC=.
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     5
fi
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     6
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     7
if [ "${TESTJAVA}" = "" ]
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     8
then
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
     9
  PARENT=`dirname \`which java\``
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    10
  TESTJAVA=`dirname ${PARENT}`
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    11
  echo "TESTJAVA not set, selecting " ${TESTJAVA}
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    12
  echo "If this is incorrect, try setting the variable manually."
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    13
fi
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    14
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    15
if [ "${TESTCLASSES}" = "" ]
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    16
then
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    17
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    18
  exit 1
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    19
fi
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    20
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    21
# set platform-dependent variables
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    22
OS=`uname -s`
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    23
case "$OS" in
13469
9a2973794d8c 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 12729
diff changeset
    24
  SunOS | Linux | Darwin)
12366
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    25
    NULL=/dev/null
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    26
    PS=":"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    27
    FS="/"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    28
    ;;
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    29
  Windows_95 | Windows_98 | Windows_ME )
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    30
    NULL=NUL
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    31
    PS=";"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    32
    FS="\\"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    33
    echo "Test skipped, only for WinNT"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    34
    exit 0
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    35
    ;;
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    36
  Windows_NT )
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    37
    NULL=NUL
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    38
    PS=";"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    39
    FS="\\"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    40
    ;;
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    41
  * )
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    42
    echo "Unrecognized system!"
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    43
    exit 1;
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    44
    ;;
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    45
esac
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    46
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    47
#CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    48
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    49
cp ${TESTSRC}${FS}*.java .
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    50
12729
684b5857e506 7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents: 12366
diff changeset
    51
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
12366
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    52
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    53
${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    54
13469
9a2973794d8c 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 12729
diff changeset
    55
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
12366
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    56
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    57
grep "A fatal error has been detected" test.out > ${NULL}
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    58
if [ $? = 0 ]; then
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    59
    cat test.out
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    60
    STATUS=1
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    61
fi
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    62
76be8878c0cd 7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff changeset
    63
exit $STATUS