Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/demo/zipfs/basic.sh
38833 views
#1# Copyright (c) 2009, 2013, 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 it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 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 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#22# @test23# @bug 6990846 7009092 7009085 7015391 7014948 7005986 7017840 700759624# 7157656 8002390 7012868 7012856 8015728 806921125# @summary Test ZipFileSystem demo26# @build Basic PathOps ZipFSTester27# @run shell basic.sh2829if [ -z "${TESTJAVA}" ]; then30echo "Test must be run with jtreg"31exit 032fi3334ZIPFS="${TESTJAVA}/demo/nio/zipfs/zipfs.jar"35if [ ! -r "${ZIPFS}" ]; then36echo "${ZIPFS} not found"37exit 038fi3940OS=`uname -s`41case "$OS" in42Windows_* | CYGWIN* )43CLASSPATH="${TESTCLASSES};${ZIPFS}"44;;45* )46CLASSPATH="${TESTCLASSES}:${ZIPFS}"47;;48esac49export CLASSPATH5051failures=05253go() {54echo ""55${TESTJAVA}/bin/java ${TESTVMOPTS} $1 $2 $3 2>&156if [ $? != 0 ]; then failures=`expr $failures + 1`; fi57}5859# Run the tests6061go Basic "${ZIPFS}"62go PathOps "${ZIPFS}"63go ZipFSTester "${ZIPFS}"6465#66# Results67#6869if [ $failures -gt 0 ];70then echo "$failures tests failed";71else echo "All tests passed";72fi73exit $failures747576