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