changeset 1480:a4a66a4c8d84

6759810: bad regression test causes source file to be deleted Reviewed-by: mcimadamore
author jjg
date Thu, 16 Oct 2008 07:39:53 -0700
parents e6dbb00a12d9
children 412a7987385c
files langtools/test/tools/javac/links/T.java langtools/test/tools/javac/links/links.sh
diffstat 2 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/test/tools/javac/links/T.java	Thu Oct 16 07:30:13 2008 -0700
+++ b/langtools/test/tools/javac/links/T.java	Thu Oct 16 07:39:53 2008 -0700
@@ -21,12 +21,4 @@
  * have any questions.
  */
 
-/*
- * @test
- * @bug 4266026
- * @summary javac no longer follows symlinks
- *
- * @run shell links.sh
- */
-
 class T extends a.B {}
--- a/langtools/test/tools/javac/links/links.sh	Thu Oct 16 07:30:13 2008 -0700
+++ b/langtools/test/tools/javac/links/links.sh	Thu Oct 16 07:39:53 2008 -0700
@@ -23,6 +23,12 @@
 # have any questions.
 #
 
+# @test
+# @bug 4266026
+# @summary javac no longer follows symlinks
+#
+# @run shell links.sh
+
 
 if [ "${TESTSRC}" = "" ]
 then
@@ -58,8 +64,11 @@
     ;;
 esac
 
+mkdir tmp
+cp ${TESTSRC}/b/B.java tmp
+
 rm -rf T.class B.class b/B.class "${TESTCLASSES}/a" "${TESTCLASSES}/classes"
-ln -s "${TESTSRC}/b" "${TESTCLASSES}/a"
+ln -s `pwd`/tmp "${TESTCLASSES}/a"
 mkdir "${TESTCLASSES}/classes"
 
-exec "${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1
+"${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1