6759810: bad regression test causes source file to be deleted

Thu, 16 Oct 2008 07:39:53 -0700

author
jjg
date
Thu, 16 Oct 2008 07:39:53 -0700
changeset 145
2c1ef6ec9413
parent 144
173162d6eb1d
child 146
6fcc8de719f5

6759810: bad regression test causes source file to be deleted
Reviewed-by: mcimadamore

test/tools/javac/links/T.java file | annotate | diff | comparison | revisions
test/tools/javac/links/links.sh file | annotate | diff | comparison | revisions
     1.1 --- a/test/tools/javac/links/T.java	Thu Oct 16 07:30:13 2008 -0700
     1.2 +++ b/test/tools/javac/links/T.java	Thu Oct 16 07:39:53 2008 -0700
     1.3 @@ -21,12 +21,4 @@
     1.4   * have any questions.
     1.5   */
     1.6  
     1.7 -/*
     1.8 - * @test
     1.9 - * @bug 4266026
    1.10 - * @summary javac no longer follows symlinks
    1.11 - *
    1.12 - * @run shell links.sh
    1.13 - */
    1.14 -
    1.15  class T extends a.B {}
     2.1 --- a/test/tools/javac/links/links.sh	Thu Oct 16 07:30:13 2008 -0700
     2.2 +++ b/test/tools/javac/links/links.sh	Thu Oct 16 07:39:53 2008 -0700
     2.3 @@ -23,6 +23,12 @@
     2.4  # have any questions.
     2.5  #
     2.6  
     2.7 +# @test
     2.8 +# @bug 4266026
     2.9 +# @summary javac no longer follows symlinks
    2.10 +#
    2.11 +# @run shell links.sh
    2.12 +
    2.13  
    2.14  if [ "${TESTSRC}" = "" ]
    2.15  then
    2.16 @@ -58,8 +64,11 @@
    2.17      ;;
    2.18  esac
    2.19  
    2.20 +mkdir tmp
    2.21 +cp ${TESTSRC}/b/B.java tmp
    2.22 +
    2.23  rm -rf T.class B.class b/B.class "${TESTCLASSES}/a" "${TESTCLASSES}/classes"
    2.24 -ln -s "${TESTSRC}/b" "${TESTCLASSES}/a"
    2.25 +ln -s `pwd`/tmp "${TESTCLASSES}/a"
    2.26  mkdir "${TESTCLASSES}/classes"
    2.27  
    2.28 -exec "${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1
    2.29 +"${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1

mercurial