181 fi 182 183 echo "Create Test.jar..." 184 if [ -f Test.jar ] ; then 185 rm -f Test.jar 186 fi 187 188 ${TESTJAVA}/bin/jar -cvf Test.jar -C ${TESTCLASSES} test 189 190 if [ $? -ne 0 ] ; then 191 fail "Failed to create Test.jar" 192 fi 193 194 # Prepare temp dir for cahce files 195 mkdir ./tmp 196 if [ $? -ne 0 ] ; then 197 fail "Unable to create temp directory." 198 fi 199 200 # Verify that all classoladers are destroyed 201 ${TESTJAVA}/bin/java -cp Test.jar test.Main 202 if [ $? -ne 0 ] ; then 203 fail "Test FAILED: some classloaders weren't destroyed." 204 fi 205 206 207 # Verify that ImageIO shutdown hook works correcly 208 ${TESTJAVA}/bin/java -cp Test.jar -DforgetSomeStreams=true test.Main 209 if [ $? -ne 0 ] ; then 210 fail "Test FAILED: some classloaders weren't destroyed of shutdown hook failed." 211 fi 212 213 # sanity check: verify that all cache files were deleted 214 cache_files=`ls tmp` 215 216 if [ "x${cache_files}" != "x" ] ; then 217 echo "WARNING: some cache files was not deleted: ${cache_files}" 218 fi 219 220 echo "Test done." 221 222 status=$? 223 224 if [ $status -eq "0" ] ; then 225 pass "" 226 else 227 fail "Test failed due to test plugin was not found." 228 fi | 181 fi 182 183 echo "Create Test.jar..." 184 if [ -f Test.jar ] ; then 185 rm -f Test.jar 186 fi 187 188 ${TESTJAVA}/bin/jar -cvf Test.jar -C ${TESTCLASSES} test 189 190 if [ $? -ne 0 ] ; then 191 fail "Failed to create Test.jar" 192 fi 193 194 # Prepare temp dir for cahce files 195 mkdir ./tmp 196 if [ $? -ne 0 ] ; then 197 fail "Unable to create temp directory." 198 fi 199 200 # Verify that all classoladers are destroyed 201 ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp Test.jar test.Main 202 if [ $? -ne 0 ] ; then 203 fail "Test FAILED: some classloaders weren't destroyed." 204 fi 205 206 207 # Verify that ImageIO shutdown hook works correcly 208 ${TESTJAVA}/bin/java ${TESTVMOPTS} \ 209 -cp Test.jar -DforgetSomeStreams=true test.Main 210 if [ $? -ne 0 ] ; then 211 fail "Test FAILED: some classloaders weren't destroyed of shutdown hook failed." 212 fi 213 214 # sanity check: verify that all cache files were deleted 215 cache_files=`ls tmp` 216 217 if [ "x${cache_files}" != "x" ] ; then 218 echo "WARNING: some cache files was not deleted: ${cache_files}" 219 fi 220 221 echo "Test done." 222 223 status=$? 224 225 if [ $status -eq "0" ] ; then 226 pass "" 227 else 228 fail "Test failed due to test plugin was not found." 229 fi |