< prev index next >

test/java/util/zip/3GBZipFiles.sh

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


  66 
  67 currentDir="`pwd`"
  68 tmpDir="$myName.tmp"
  69 
  70 cleanup () { cd "$currentDir" && rm -rf "$tmpDir"; }
  71 
  72 trap cleanup 0 1 2 15
  73 
  74 sys rm -rf "$tmpDir"
  75 sys mkdir "$tmpDir"
  76 cd "$tmpDir"
  77 
  78 buildFile ()
  79 {
  80   filetype_="$1"
  81   filename_="$2"
  82   case "$filename_" in
  83     huge-*) filesize_="$hugeSize" ;;
  84     tiny-*) filesize_="$tinySize" ;;
  85   esac
  86   sys "$JAVA" "-cp" "$TESTCLASSES" "FileBuilder" \
  87    "$filetype_" "$filename_" "$filesize_"
  88 }
  89 
  90 testJarFile ()
  91 {
  92   echo "-------------------------------------------------------"
  93   echo "Testing $1 $2"
  94   echo "-------------------------------------------------------"
  95 
  96   filetype="$1"
  97   if test "$2" = "STORED"; then jarOpt="0"; else jarOpt=""; fi
  98   filelist="$3"
  99   jarFile="$myName.jar"
 100 
 101   for file in $filelist; do
 102     buildFile "$filetype" "$file"
 103   done
 104 
 105   sys "$JAR" cvM${jarOpt}f "$jarFile" $filelist
 106   sys ls -l "$jarFile"



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


  65 
  66 currentDir="`pwd`"
  67 tmpDir="$myName.tmp"
  68 
  69 cleanup () { cd "$currentDir" && rm -rf "$tmpDir"; }
  70 
  71 trap cleanup 0 1 2 15
  72 
  73 sys rm -rf "$tmpDir"
  74 sys mkdir "$tmpDir"
  75 cd "$tmpDir"
  76 
  77 buildFile ()
  78 {
  79   filetype_="$1"
  80   filename_="$2"
  81   case "$filename_" in
  82     huge-*) filesize_="$hugeSize" ;;
  83     tiny-*) filesize_="$tinySize" ;;
  84   esac
  85   sys "$JAVA" ${TESTVMOPTS} "-cp" "$TESTCLASSES" "FileBuilder" \
  86    "$filetype_" "$filename_" "$filesize_"
  87 }
  88 
  89 testJarFile ()
  90 {
  91   echo "-------------------------------------------------------"
  92   echo "Testing $1 $2"
  93   echo "-------------------------------------------------------"
  94 
  95   filetype="$1"
  96   if test "$2" = "STORED"; then jarOpt="0"; else jarOpt=""; fi
  97   filelist="$3"
  98   jarFile="$myName.jar"
  99 
 100   for file in $filelist; do
 101     buildFile "$filetype" "$file"
 102   done
 103 
 104   sys "$JAR" cvM${jarOpt}f "$jarFile" $filelist
 105   sys ls -l "$jarFile"


< prev index next >