# HG changeset patch # User chegar # Date 1312904344 -3600 # Node ID dee4cb73adc3a5e35fcfc49a735dfad68909514d # Parent 3b6ad02f4a40916bec77bc408573cfb9330c0efc 7073295: TEST_BUG: test/java/lang/instrument/ManifestTest.sh causing havoc (win) Reviewed-by: mchung diff -r 3b6ad02f4a40 -r dee4cb73adc3 jdk/test/java/lang/instrument/ManifestTest.sh --- a/jdk/test/java/lang/instrument/ManifestTest.sh Mon Aug 08 16:27:41 2011 -0700 +++ b/jdk/test/java/lang/instrument/ManifestTest.sh Tue Aug 09 16:39:04 2011 +0100 @@ -26,7 +26,7 @@ # @summary JLI JAR manifest processing should ignore leading and trailing white space. # @author Daniel D. Daugherty # -# @run build ManifestTestApp +# @run build ManifestTestApp ExampleForBootClassPath # @run shell/timeout=900 ManifestTest.sh # @@ -42,6 +42,9 @@ expect_retrans_line="isRetransformClassesSupported()=false" can_set_nmp_line="" expect_set_nmp_line="isNativeMethodPrefixSupported()=false" + # some tests create directories with spaces in their name, + # explicitly delete these. + to_be_deleted="" while [ $# != 0 ] ; do case "$1" in @@ -59,30 +62,33 @@ boot_cp_line2) boot_cp_line="Boot-Class-Path: has_leading_blank" expect_boot_cp_line="ExampleForBootClassPath was loaded." + to_be_deleted=" has_leading_blank" mkdir -p has_leading_blank " has_leading_blank" # the good class is in the directory without the blank cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class \ has_leading_blank # the bad class is in the directory with the blank cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \ - " has_leading_blank"/ExampleForBootClassPath.class + " has_leading_blank/ExampleForBootClassPath.class" ;; boot_cp_line3) boot_cp_line="Boot-Class-Path: has_trailing_blank " expect_boot_cp_line="ExampleForBootClassPath was loaded." + to_be_deleted="has_trailing_blank " mkdir -p has_trailing_blank "has_trailing_blank " # the good class is in the directory without the blank cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class \ has_trailing_blank # the bad class is in the directory with the blank cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \ - "has_trailing_blank "/ExampleForBootClassPath.class + "has_trailing_blank /ExampleForBootClassPath.class" ;; boot_cp_line4) boot_cp_line="Boot-Class-Path: has_leading_and_trailing_blank " expect_boot_cp_line="ExampleForBootClassPath was loaded." + to_be_deleted=" has_leading_and_trailing_blank " mkdir -p has_leading_and_trailing_blank \ " has_leading_and_trailing_blank " # the good class is in the directory without the blanks @@ -90,18 +96,19 @@ has_leading_and_trailing_blank # the bad class is in the directory with the blanks cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \ - " has_leading_and_trailing_blank "/ExampleForBootClassPath.class + " has_leading_and_trailing_blank /ExampleForBootClassPath.class" ;; boot_cp_line5) boot_cp_line="Boot-Class-Path: has_embedded blank" expect_boot_cp_line="ExampleForBootClassPath was loaded." + to_be_deleted="has_embedded blank" mkdir -p has_embedded "has_embedded blank" # the good class is in the first blank separated word cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class has_embedded # the bad class is in the directory with the blank cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \ - "has_embedded blank"/ExampleForBootClassPath.class + "has_embedded blank/ExampleForBootClassPath.class" ;; can_redef_line1) @@ -429,6 +436,12 @@ touch $FAIL_MARKER fi + #clean up any problematic directories + if [ -n "$to_be_deleted" ]; then + echo "Test removing [$to_be_deleted]" + rm -rf "$to_be_deleted" + fi + echo "===== end test case: $token =====" echo done << EOF