test/java/nio/charset/spi/basic.sh

Print this page
rev 8975 : 8028537: PPC64: Updated the JDK regression tests to run on AIX
Reviewed-by: alanb
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, volker.simonis@gmail.com


  31 # @run shell basic.sh
  32 # @run shell basic.sh ja_JP.eucJP
  33 # @run shell basic.sh tr_TR
  34 #
  35 
  36 # Command-line usage: sh basic.sh /path/to/build [locale]
  37 
  38 if [ -z "$TESTJAVA" ]; then
  39   if [ $# -lt 1 ]; then exit 1; fi
  40   TESTJAVA=$1; shift
  41   COMPILEJDK="${TESTJAVA}"
  42   TESTSRC=`pwd`
  43   TESTCLASSES=`pwd`
  44 fi
  45 
  46 JAVA=$TESTJAVA/bin/java
  47 JAR=$COMPILEJAVA/bin/jar
  48 
  49 DIR=`pwd`
  50 case `uname` in
  51   SunOS | Linux | Darwin ) CPS=':' ;;
  52   Windows* )      CPS=';' ;;
  53   CYGWIN*  )
  54     DIR=`/usr/bin/cygpath -a -s -m $DIR`
  55     CPS=";";;
  56   *)              echo "Unknown platform: `uname`"; exit 1 ;;
  57 esac
  58 
  59 JARD=$DIR/x.jar
  60 EXTD=$DIR/x.ext
  61 TESTD=$DIR/x.test
  62 
  63 CSS='US-ASCII 8859_1 iso-ir-6 UTF-16 windows-1252 !BAR cp1252'
  64 
  65 
  66 if [ \! -d $EXTD ]; then
  67     # Initialize
  68     echo Initializing...
  69     rm -rf $JARD $EXTD $TESTD
  70     mkdir -p $JARD/META-INF/services x.ext
  71     echo FooProvider \
  72       >$JARD/META-INF/services/java.nio.charset.spi.CharsetProvider
  73     cp $TESTCLASSES/FooProvider.class $TESTCLASSES/FooCharset.class $JARD
  74     mkdir $TESTD
  75     cp $TESTCLASSES/Test.class $TESTD
  76     (cd $JARD; $JAR ${TESTTOOLVMOPTS} -cf $EXTD/test.jar *)
  77 fi
  78 
  79 if [ $# -gt 0 ]; then
  80     # Use locale specified on command line, if it's supported
  81     L="$1"
  82     shift
  83     s=`uname -s`
  84     if [ $s != Linux -a $s != SunOS -a $s != Darwin ]; then
  85       echo "$L: Locales not supported on this system, skipping..."
  86       exit 0
  87     fi
  88     if [ "x`locale -a | grep $L`" != "x$L" ]; then
  89       echo "$L: Locale not supported, skipping..."
  90       exit 0
  91     fi
  92     LC_ALL=$L; export LC_ALL
  93 fi
  94 
  95 TMP=${TMP:-$TEMP}; TMP=${TMP:-/tmp}
  96 cd $TMP
  97 
  98 failures=0
  99 for where in ext app; do
 100   for security in none minimal-policy cp-policy; do
 101     echo '';
 102     echo "LC_ALL=$LC_ALL where=$where security=$security"
 103     av=''
 104     if [ $where = ext ]; then




  31 # @run shell basic.sh
  32 # @run shell basic.sh ja_JP.eucJP
  33 # @run shell basic.sh tr_TR
  34 #
  35 
  36 # Command-line usage: sh basic.sh /path/to/build [locale]
  37 
  38 if [ -z "$TESTJAVA" ]; then
  39   if [ $# -lt 1 ]; then exit 1; fi
  40   TESTJAVA=$1; shift
  41   COMPILEJDK="${TESTJAVA}"
  42   TESTSRC=`pwd`
  43   TESTCLASSES=`pwd`
  44 fi
  45 
  46 JAVA=$TESTJAVA/bin/java
  47 JAR=$COMPILEJAVA/bin/jar
  48 
  49 DIR=`pwd`
  50 case `uname` in
  51   SunOS | Linux | Darwin | AIX ) CPS=':' ;;
  52   Windows* )      CPS=';' ;;
  53   CYGWIN*  )
  54     DIR=`/usr/bin/cygpath -a -s -m $DIR`
  55     CPS=";";;
  56   *)              echo "Unknown platform: `uname`"; exit 1 ;;
  57 esac
  58 
  59 JARD=$DIR/x.jar
  60 EXTD=$DIR/x.ext
  61 TESTD=$DIR/x.test
  62 
  63 CSS='US-ASCII 8859_1 iso-ir-6 UTF-16 windows-1252 !BAR cp1252'
  64 
  65 
  66 if [ \! -d $EXTD ]; then
  67     # Initialize
  68     echo Initializing...
  69     rm -rf $JARD $EXTD $TESTD
  70     mkdir -p $JARD/META-INF/services x.ext
  71     echo FooProvider \
  72       >$JARD/META-INF/services/java.nio.charset.spi.CharsetProvider
  73     cp $TESTCLASSES/FooProvider.class $TESTCLASSES/FooCharset.class $JARD
  74     mkdir $TESTD
  75     cp $TESTCLASSES/Test.class $TESTD
  76     (cd $JARD; $JAR ${TESTTOOLVMOPTS} -cf $EXTD/test.jar *)
  77 fi
  78 
  79 if [ $# -gt 0 ]; then
  80     # Use locale specified on command line, if it's supported
  81     L="$1"
  82     shift
  83     s=`uname -s`
  84     if [ $s != Linux -a $s != SunOS -a $s != Darwin -a $s != AIX ]; then
  85       echo "$L: Locales not supported on this system, skipping..."
  86       exit 0
  87     fi
  88     if [ "x`locale -a | grep $L`" != "x$L" ]; then
  89       echo "$L: Locale not supported, skipping..."
  90       exit 0
  91     fi
  92     LC_ALL=$L; export LC_ALL
  93 fi
  94 
  95 TMP=${TMP:-$TEMP}; TMP=${TMP:-/tmp}
  96 cd $TMP
  97 
  98 failures=0
  99 for where in ext app; do
 100   for security in none minimal-policy cp-policy; do
 101     echo '';
 102     echo "LC_ALL=$LC_ALL where=$where security=$security"
 103     av=''
 104     if [ $where = ext ]; then