< prev index next >

test/jdk/java/awt/JAWT/JAWT.sh

Print this page
rev 59383 : [mq]: final
   1 #!/bin/sh
   2 
   3 # Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
   4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5 #
   6 # This code is free software; you can redistribute it and/or modify it
   7 # under the terms of the GNU General Public License version 2 only, as
   8 # published by the Free Software Foundation.
   9 #
  10 # This code is distributed in the hope that it will be useful, but WITHOUT
  11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13 # version 2 for more details (a copy is included in the LICENSE file that
  14 # accompanied this code).
  15 #
  16 # You should have received a copy of the GNU General Public License version
  17 # 2 along with this work; if not, write to the Free Software Foundation,
  18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19 #
  20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21 # or visit www.oracle.com if you need additional information or have any
  22 # questions.
  23 


  50     NULL=/dev/null
  51     PS=":"
  52     FS="/"
  53     ${TESTJAVA}${FS}bin${FS}java -version 2>&1 | grep '64-Bit' > $NULL
  54     if [ $? -eq '0' ]
  55     then
  56         ARCH="amd64"
  57     else
  58         ARCH="i386"
  59     fi
  60     SYST="linux"
  61     MAKEFILE="Makefile.unix"
  62     CC="gcc"
  63         MAKE="make"
  64         LD_LIBRARY_PATH="."
  65     ;;
  66   AIX )
  67       echo "Test passed. Not supported on AIX."
  68       exit 0
  69     ;;
  70   SunOS )
  71     NULL=/dev/null
  72     PS=":"
  73     FS="/"
  74     if [ `uname -p | grep -c 'sparc'` -gt '0' ]
  75     then
  76         ARCH="sparc"
  77     else
  78         ARCH="i386"
  79     fi
  80     SYST="solaris"
  81     MAKEFILE="Makefile.unix"
  82     CC="gcc"
  83         MAKE="make"
  84         LD_LIBRARY_PATH="."
  85     ;;
  86   Windows* )
  87     NULL=null
  88     PS=";"
  89     FS="\\"
  90     MAKEFILE="Makefile.win"
  91     CC="cl"
  92         MAKE="nmake"
  93         ${TESTJAVA}${FS}bin${FS}java -version 2>&1 | grep '64-Bit' > $NULL
  94     if [ "$?" -eq '0' ]
  95     then
  96         ARCH="amd64"
  97     else
  98         ARCH="i386"
  99     fi
 100         SYST="windows"
 101     ;;
 102   CYGWIN* )
 103     NULL=/dev/null
 104     PS=":"
 105     FS="/"


 132       exit 0
 133       ;;
 134 esac
 135 
 136 echo "OS-ARCH is" ${SYST}-${ARCH}
 137 ${TESTJAVA}${FS}bin${FS}java -fullversion 2>&1
 138 
 139 which ${MAKE} >${NULL} 2>&1
 140 if [ "$?" -ne '0' ]
 141 then
 142     echo "No make found. Test passed."
 143     exit 0
 144 fi
 145 
 146 which ${CC} >${NULL} 2>&1
 147 if [ "$?" -ne '0' ]
 148 then
 149     echo "No C compiler found. Test passed."
 150     exit 0
 151 fi
 152 case "$OS" in
 153     SunOS )
 154       ${CC} -v >${NULL} 2>&1
 155       if [ "$?" -ne '0' ]
 156       then
 157           echo "No C compiler found. Test passed."
 158           exit 0
 159       fi
 160 esac
 161 
 162 cp ${TESTSRC}${FS}${MAKEFILE} .
 163 
 164 JAVA=${TESTJAVA}${FS}bin${FS}java
 165 JAVAC=${TESTJAVA}${FS}bin${FS}javac
 166 
 167 export CC SYST ARCH LD_LIBRARY_PATH
 168 
 169 ${JAVAC} -d . -h . ${TESTSRC}${FS}MyCanvas.java
 170 ${MAKE} -f ${MAKEFILE}
 171 ${JAVA} ${TESTVMOPTS} -classpath . MyCanvas
 172 
 173 exit $?
 174 
   1 #!/bin/sh
   2 
   3 # Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
   4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5 #
   6 # This code is free software; you can redistribute it and/or modify it
   7 # under the terms of the GNU General Public License version 2 only, as
   8 # published by the Free Software Foundation.
   9 #
  10 # This code is distributed in the hope that it will be useful, but WITHOUT
  11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13 # version 2 for more details (a copy is included in the LICENSE file that
  14 # accompanied this code).
  15 #
  16 # You should have received a copy of the GNU General Public License version
  17 # 2 along with this work; if not, write to the Free Software Foundation,
  18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19 #
  20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21 # or visit www.oracle.com if you need additional information or have any
  22 # questions.
  23 


  50     NULL=/dev/null
  51     PS=":"
  52     FS="/"
  53     ${TESTJAVA}${FS}bin${FS}java -version 2>&1 | grep '64-Bit' > $NULL
  54     if [ $? -eq '0' ]
  55     then
  56         ARCH="amd64"
  57     else
  58         ARCH="i386"
  59     fi
  60     SYST="linux"
  61     MAKEFILE="Makefile.unix"
  62     CC="gcc"
  63         MAKE="make"
  64         LD_LIBRARY_PATH="."
  65     ;;
  66   AIX )
  67       echo "Test passed. Not supported on AIX."
  68       exit 0
  69     ;;
















  70   Windows* )
  71     NULL=null
  72     PS=";"
  73     FS="\\"
  74     MAKEFILE="Makefile.win"
  75     CC="cl"
  76         MAKE="nmake"
  77         ${TESTJAVA}${FS}bin${FS}java -version 2>&1 | grep '64-Bit' > $NULL
  78     if [ "$?" -eq '0' ]
  79     then
  80         ARCH="amd64"
  81     else
  82         ARCH="i386"
  83     fi
  84         SYST="windows"
  85     ;;
  86   CYGWIN* )
  87     NULL=/dev/null
  88     PS=":"
  89     FS="/"


 116       exit 0
 117       ;;
 118 esac
 119 
 120 echo "OS-ARCH is" ${SYST}-${ARCH}
 121 ${TESTJAVA}${FS}bin${FS}java -fullversion 2>&1
 122 
 123 which ${MAKE} >${NULL} 2>&1
 124 if [ "$?" -ne '0' ]
 125 then
 126     echo "No make found. Test passed."
 127     exit 0
 128 fi
 129 
 130 which ${CC} >${NULL} 2>&1
 131 if [ "$?" -ne '0' ]
 132 then
 133     echo "No C compiler found. Test passed."
 134     exit 0
 135 fi









 136 
 137 cp ${TESTSRC}${FS}${MAKEFILE} .
 138 
 139 JAVA=${TESTJAVA}${FS}bin${FS}java
 140 JAVAC=${TESTJAVA}${FS}bin${FS}javac
 141 
 142 export CC SYST ARCH LD_LIBRARY_PATH
 143 
 144 ${JAVAC} -d . -h . ${TESTSRC}${FS}MyCanvas.java
 145 ${MAKE} -f ${MAKEFILE}
 146 ${JAVA} ${TESTVMOPTS} -classpath . MyCanvas
 147 
 148 exit $?
 149 
< prev index next >