Skip to content

Commit

Permalink
8296137: diags-examples.xml is broken
Browse files Browse the repository at this point in the history
Backport-of: f8b2574ebc32fa0e62dbaa0f2447757ff83c320f
  • Loading branch information
GoeLin committed Apr 1, 2024
1 parent b37df14 commit b4e64ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions make/langtools/diags-examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ Usage:
By default, the reports will be generated in langtools/build/diags-examples/report/.
-->

<project name="diags-examples" default="diags-examples" basedir="..">
<project name="diags-examples" default="diags-examples" basedir="../..">
<import file="build.xml"/>

<!-- specify working directory for the tool -->
<property name="diags.examples.dir" location="${build.dir}/diag-examples"/>

<!-- compiled classes for the tool -->
<property name="diags.examples.classes" location="${diags.examples.dir}/classes}"/>
<property name="diags.examples.classes" location="${diags.examples.dir}/classes"/>

<!-- directory for generated reports -->
<property name="diags.examples.report" location="${diags.examples.dir}/report"/>

<!-- default target, generates reports for all available locales -->
<target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN"/>
<target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN,run-de"/>

<!-- generate report for US English locale -->
<target name="run-en_US" depends="-build-runner,-def-runner">
Expand All @@ -68,12 +68,18 @@ By default, the reports will be generated in langtools/build/diags-examples/repo
<runner lang="zh" country="CN" outfile="${diags.examples.report}/zh_CN.html"/>
</target>

<!-- generate report for German locale -->
<target name="run-de" depends="-build-runner,-def-runner">
<mkdir dir="${diags.examples.report}"/>
<runner lang="de" outfile="${diags.examples.report}/de.html"/>
</target>

<!-- compile the tool that runs the examples -->
<target name="-build-runner" depends="build">
<mkdir dir="${diags.examples.classes}"/>
<javac fork="true"
executable="${build.bin}/javac"
srcdir="test/tools/javac/diags"
srcdir="test/langtools/tools/javac/diags"
destdir="${diags.examples.classes}"
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
sourcepath=""
Expand All @@ -98,7 +104,7 @@ By default, the reports will be generated in langtools/build/diags-examples/repo
<sequential>
<java fork="true"
jvm="${langtools.jdk.home}/bin/java"
dir="test/tools/javac/diags"
dir="test/langtools/tools/javac/diags"
classpath="${diags.examples.classes};${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
classname="RunExamples">
<jvmarg value="-Duser.language=@{lang}"/>
Expand Down
2 changes: 1 addition & 1 deletion test/langtools/tools/javac/diags/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private void run(PrintWriter out, Set<String> keys, boolean raw, boolean verbose
//automatic modules:
Map<String, List<Path>> module2Files =
modulePathFiles.stream()
.map(f -> f.toPath())
.map(f -> f.toPath().toAbsolutePath())
.collect(Collectors.groupingBy(p -> modulePath.relativize(p)
.getName(0)
.toString()));
Expand Down

1 comment on commit b4e64ff

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.