-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2
-
b11
-
x86
-
windows_98
-
Verified
Name: aaR10208 Date: 11/20/2002
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.4.2-b07
Testbase : Regression
Platform[s] : generic
Falling test[s]: com/sun/javadoc/testDocFileDir/TestDocFileDir.java
Here is a part of the test source (file: com/sun/javadoc/testDocFileDir/TestDocFileDir.java)
=====
13 public class TestDocFileDir extends JavadocTester {
14
15 //Output dir = Input Dir
16 private static final String OUTPUT_DIR = SRC_DIR;
...
21 private static final String[] ARGS =
22 new String[] {
! 23 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg"};
=====
The test uses SRC_DIR (inherited from the JavadocTester class) and passes this
directory as output dir for javadoc files.
The problem is that JavadocTester::SRC_DIR points to the *source* directory, which
is located in the testbase directory.
This causes one of the next problems:
1. The test either creates javadoc files in the testbase directory, and such files are not
cleaned out by the Jtreg
or
2. If the user does not have permissions to write into the testbase directory, the test will
test nothing.
The test must use System.getProperty("test.classes", ".") to get the OUTPUT_DIR value.
Test source location:
=====================
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java
How to reproduce:
=================
Run the following script. (You may need to change its variables).
You will see either that .html files are created in $TESTBASE/com/sun/javadoc/testDocFileDir/
directory (if you have permissions to write there) or that the test reports "Test passed" while
it was not able to write any file.
----- script start -----
#!/bin/sh
TESTJAVA=c:/jdk1.4.2
TESTBASE=h:/java/regtest/test
JCT=h:/java/jct
TESTDIR=$TESTBASE/com/sun/javadoc/testDocFileDir
$JCT/linux/bin/jtreg -jdk:$TESTJAVA $TESTDIR
----- script end -----
Specific machine info:
======================
Hostname: linux-17
OS: Windows 98
======================================================================