This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 148068

Summary: test-generate-html task should setup test.results.dir
Product: apisupport Reporter: Martin Schovanek <mschovanek>
Component: HarnessAssignee: Martin Schovanek <mschovanek>
Status: RESOLVED FIXED    
Severity: blocker CC: jglick, jungi
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 185194    
Bug Blocks:    
Attachments: common.xml patch
Better patch.
patch w/o nbbrowse

Description Martin Schovanek 2008-09-23 16:27:56 UTC
Now you have to setup the test.results.dir property manually otherwise the task fails with:

$ ant test-generate-html
Buildfile: build.xml

-do-test-generate-html:

BUILD FAILED
/space/nbhg/main/nbbuild/templates/common.xml:558: /space/nbhg/main/languages/${test.results.dir} not found.

The fix should be easy, see the attached patch. If nobody objects I'll commit it at Fri.
Comment 1 Martin Schovanek 2008-09-23 16:31:17 UTC
Created attachment 70340 [details]
common.xml patch
Comment 2 Jesse Glick 2008-09-23 18:29:02 UTC
[JG01] Do not use

Report URL: file:${basedir}/html/index.html

Rather run <makeurl> so as to work correctly on all platforms.


[JG02] You can simplify by making -test-browse-html depend on -do-test-generate-html and calling only -test-browse-html
in <subant>.
Comment 3 Martin Schovanek 2008-09-24 13:16:04 UTC
Created attachment 70446 [details]
Better patch.
Comment 4 Martin Schovanek 2008-09-24 13:19:18 UTC
CCing Lukas who have a idea how to browse results without Nb.
Comment 5 Lukas Jungmann 2008-09-24 14:54:06 UTC
Created attachment 70478 [details]
patch w/o nbbrowse
Comment 6 Lukas Jungmann 2008-09-24 14:58:38 UTC
idea used in a patch I attached is stolen from webapps' headless build created by Stepan Herold. Also note that it will
perhaps need some cleanup and testing (I didn't do that, sorry) - feel free to improve and apply it if it suites your
needs ;-)
Comment 7 Jesse Glick 2008-09-24 16:27:41 UTC
mschovanek's last patch looks fine to me.

Please do not use jungi's patch. The browser display is intended only for interactive use within the IDE. Command-line
builds should not attempt to do anything like this.
Comment 8 Lukas Jungmann 2008-09-24 16:34:51 UTC
Just FYI: my intention was only to avoid using nbbrowse, nothing else - therefore I didn't spend time on making
conditions "correct" in sense of when exactly to open a browser
Comment 9 Jesse Glick 2008-09-24 16:38:59 UTC
Lots of targets that create HTML of possible interest run nbbrowse when netbeans.home is set (i.e. when run from inside
the IDE). When run outside the IDE, whether on a desktop machine or a headless server, we do not want to do anything.
Comment 10 Lukas Jungmann 2008-09-24 16:43:11 UTC
OK, I'm not trying to convince you.
Comment 11 Martin Schovanek 2008-09-28 21:22:33 UTC
http://hg.netbeans.org/main/rev/c1a418952c3b
Comment 12 Martin Schovanek 2008-09-28 22:29:48 UTC
fixed
Comment 13 Quality Engineering 2008-09-29 05:32:45 UTC
Integrated into 'main-golden', will be available in build *200809290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c1a418952c3b
User: Martin Schovanek <mschovanek@netbeans.org>
Log: Issue #148068 - test-generate-html task should setup test.results.dir