Because JavaTest reports contain links to files, you must update the links when moving reports to other directories. The JavaTest harness provides an EditLinks utility for you to use when moving reports.
EditLinks reads one or more files or directories and copies them to a new file or directory. Files whose names end with ".html" are checked to see if they contain any HTML links that begin with certain filenames. Any that do are rewritten with a corresponding different filename. All other files are copied without change.
Example:
java -classpath lib/javatest.jar com.sun.javatest.EditLinks
OPTIONS file...
-e
oldPrefix newPrefix
-e
options
may be given; when editing a file, the options are checked in the order
they are given.
-e /work/ /java/jck-dev/scratch/12Jun00/jck-lab3/
<a href="/work/api/java_lang/results.jtr">/work/api/java_lang/results.jtr</a>
<a href="/work/api/java_lang/results.jtr">/work/api/java_lang/results.jtr</a>
<a href="/java/jck-dev/scratch/12Jun00/jck-lab3/api/java_lang/results.jtr">/work/api/java_lang/results.jtr</a>
-ignore
file
-ignore
may be given.
For example, '-ignore SCCS
' will cause any directories named SCCS
to be ignored.
-o
file
0 | the copy was successful |
1 | there was a problem with the command line arguments |
2 | an error occurred while trying to perform the copy |
To run the following example you must replace myworkdir.wd
with a work directory name that exists on your system. Win32 users must also replace the "\" file separators with "/" to run these examples.
java -cp lib/javatest.jar com.sun.javatest.EditLinks -e /work/ /java/jck-dev/scratch/12Jun00/jck-lab3/ -o test12_dir.wd myworkdir.wd
A detailed description of the utility is also available in your TCK at:
doc/javatest/editlinks.html