Debugging Jigsaw test cases in an IDE
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Feb 29 15:55:16 PST 2012
I believe it is "on the list" for the build-infra team to revisit IDE
projects after the initial Makefile work is done.
Work to make jtreg Jigsaw-friendly is underway.
-- Jon
On 02/29/2012 03:41 PM, Jesse Glick wrote:
> On 02/29/2012 05:14 PM, David Bosschaert wrote:
>> I looked at the Netbeans
>> setup instructions in /jdk/make/netbeans/j2se and set up the IDE that
>> way, but when I do 'Debug File' on the _ModuleId.java test above (or
>> any other test)
>> It fails
>
> Not surprisingly, because jtreg is not apparently bound to anything in
> project.xml, and the generic targets that might get set up if you
> accept the IDE's offer to generate them have no chance of working for
> this specialized test harness.
>
> I took a stab at writing jtreg NB bindings for this project and am
> including the patch for you to try. Run File seems to work (opens a
> browser on the results if there were failures). Note that Debug File
> does not work for me because of a "transport error"; not sure if this
> is just a case of debugging being broken in the current VM, or if
> something in shared.xml is still wrong.
>
> Cannot create attachments so just pasting inline - hope you can apply
> it. This really ought to be applied against OpenJDK 7 and merged into
> 8 and then Jigsaw, of course.
>
> -------%<--------
>
> # HG changeset patch
> # Parent 115b3bb6de96bbd0ce2203a272b80ef4a5b36d97
> # User Jesse Glick <jglick at netbeans.org>
> Fix up jtreg actions, and bind them to run.single and debug.single in
> NetBeans.
>
>
> diff --git a/make/netbeans/common/shared.xml
> b/make/netbeans/common/shared.xml
> --- a/make/netbeans/common/shared.xml
> +++ b/make/netbeans/common/shared.xml
> @@ -75,7 +75,7 @@
> <property file="../common/architectures/arch-${os.arch}.properties"/>
> <property name="arch" value="${os.arch}"/>
> <echo level="verbose">System configuration claims architecture is
> ${platform}-${arch}</echo>
> - <property name="build.dir"
> location="${root}/build/${platform}-${arch}"/>
> + <property name="build.dir"
> location="${root}/../build/${platform}-${arch}"/>
> <property name="bin.dir" location="${build.dir}/bin"/>
> <property name="make.dir" location="${root}/make"/>
> <property name="gensrc.dir" location="${build.dir}/gensrc"/>
> @@ -277,7 +277,7 @@
> <!-- You can override this target in the ../build.xml file. -->
> </target>
> <target name="-jtreg"
> depends="-init,-pre-jtreg,-taskdef-jtreg,-check-tests-defined,-jtreg-setup,-jtreg-make,-jtreg-ant,-post-jtreg">
> - <property name="jtreg.report"
> location="${jtreg.dir}/JTreport/report.html"/>
> + <property name="jtreg.report"
> location="${jtreg.dir}/JTreport/html/report.html"/>
> <condition property="jtreg.passed">
> <equals arg1="${jtreg.result}" arg2="0"/>
> </condition>
> diff --git a/make/netbeans/j2se/nbproject/project.xml
> b/make/netbeans/j2se/nbproject/project.xml
> --- a/make/netbeans/j2se/nbproject/project.xml
> +++ b/make/netbeans/j2se/nbproject/project.xml
> @@ -79,6 +79,30 @@
> <target>javadoc-nb</target>
> </action>
> -->
> + <action name="run.single">
> + <target>jtreg-nb</target>
> + <context>
> + <property>jtreg.tests</property>
> + <folder>${root}/test</folder>
> + <pattern>\.java$</pattern>
> + <format>relative-path</format>
> + <arity>
> + <separated-files/>
> + </arity>
> + </context>
> + </action>
> + <action name="debug.single">
> + <target>jtreg-debug-nb</target>
> + <context>
> + <property>jtreg.tests</property>
> + <folder>${root}/test</folder>
> + <pattern>\.java$</pattern>
> + <format>relative-path</format>
> + <arity>
> + <one-file-only/>
> + </arity>
> + </context>
> + </action>
> </ide-actions>
> <view>
> <items>
More information about the jigsaw-dev
mailing list