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 178009 - build-test-dist for the single CND cluster
Summary: build-test-dist for the single CND cluster
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: TEST
: 160700 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-02 10:49 UTC by Alexey Vladykin
Modified: 2011-05-06 05:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Vladykin 2009-12-02 10:49:37 UTC
Some time ago it was possible to produce testdist.zip containing only cnd tests (and their dependencies). cnd continuous integration used these commands:
# ant -Dcluster.config=cnd build-nozip
# ant -Dmoduleconfig=cnd build-test-dist

The moduleconfig property seems to be gone now. I've tried cluster.config instead:
# ant -Dcluster.config=cnd build-nozip
# ant -Dcluster.config=cnd build-test-dist

But it fails. build-test-dist can't build editor.lib2's tests, it complains:
-missing-Module-Entries-: org.netbeans.modules.java.lexer

The workaround I've found so far is
# ant build-nozip
# ant build-test-dist

Adding -Dcluster.config=cnd to any of these ant invocations makes build-test-dist fail. So cnd continuous build has to waste time building all IDE clusters and all their tests.

Is it possible to build only cnd cluster and only cnd's tests (with their dependencies)?
Comment 1 Jesse Glick 2009-12-02 11:56:36 UTC
The problem is in editor.lib2/test/unit/src/org/netbeans/spi/editor/highlighting/performance/SyntaxHighlightingTest.java which illegally makes use of a class (JavaTokenId) from a "higher" cluster (ide cannot depend on java). This test must either be fixed to use a test language of some kind, or be moved to the java.lexer module.
Comment 2 Vladimir Voskresensky 2009-12-03 07:01:42 UTC
Editor team, 
Could you, please, fix it? We are missing our unit tests very much :-)

Thanks,
Vladimir.
Comment 3 Vitezslav Stejskal 2009-12-03 09:29:53 UTC
http://hg.netbeans.org/jet-main/rev/1a14fee64155
Comment 4 Vladimir Voskresensky 2009-12-03 10:15:29 UTC
Thanks, Vita!
Comment 5 Jesse Glick 2009-12-03 10:20:16 UTC
There are other problems, such as in the favorites module.
Comment 6 Jesse Glick 2009-12-03 16:22:26 UTC
In fact in a number of modules. I am trying to correct them all.
Comment 7 Jesse Glick 2009-12-03 17:10:44 UTC
Still working on it...
Comment 8 Jesse Glick 2009-12-03 17:11:01 UTC
*** Bug 160700 has been marked as a duplicate of this bug. ***
Comment 9 Jesse Glick 2009-12-03 18:01:28 UTC
Somewhat painful, but my core-main #6d0f4a898c80 plus vstejskal's 1a14fee64155 makes

ant -Dcluster.config=cnd clean build-nozip build-test-dist

succeed.
Comment 10 Alexey Vladykin 2009-12-04 01:42:45 UTC
Many thanks for your tremendous work!
Comment 11 Jesse Glick 2009-12-04 08:50:48 UTC
Both changesets are now in cnd-main so please verify that it is working for you.

The command should build tests for those modules in ${clusters.config.cnd.list}, which I think should be acceptable - took 16 minutes on my laptop from a clean checkout. Building tests only for those modules in the cnd and dlight clusters is only possible if enumerated in -Dallmodules=...; passing -Dclusters.list=nb.cluster.cnd,nb.cluster.dlight does not work because <parseprojectxml> is then unable to locate test dependencies such as nbjunit.
Comment 12 Alexey Vladykin 2009-12-04 09:52:12 UTC
ant -Dcluster.config=cnd clean build-nozip build-test-dist
works like a charm now, thanks!

30M testdist.zip + 50M netbeans.zip are much better than 80M testdist.zip + 200M netbeans.zip. Build time also decreased by about 20 minutes.
Comment 13 Quality Engineering 2009-12-04 16:15:15 UTC
Integrated into 'main-golden', will be available in build *200912041400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6d0f4a898c80
User: Jesse Glick <jglick@netbeans.org>
Log: #178009: dependencies on "higher" clusters are not permitted, even from tests.
Attempts to use e.g. java cluster from ide cluster tests can cause build-test-dist to fail in some cluster configs.
Removing illegal dependencies; in some cases they were unused, or the code using them could be easily excised.
In other cases, most of the test root was relying on an illegal dep, so just disabling that test root until it can be fixed.
Most useful would be a test utility in the ide cluster to create a generic "project" with no domain-specific behavior;
lots of tests seem to make a j2seproject just for the sake of having something open with some sample files,
for which the functionality of the j2seproject module is overkill and introduces performance and robustness penalties
(such as waiting for "scanning to finish" when the test does not even relate to Java source editing).
Also removing the performance pseudomodule from the BTD as it has various dependencies inapplicable to some configs;
better to factor it into utility modules according to domain, as was done for jellytools, and remove special treatment.
Comment 14 Quality Engineering 2011-05-06 05:08:54 UTC
Integrated into 'main-golden', will be available in build *201105060000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d62f7171ba08
User: Stepan Zebra <stezeb@netbeans.org>
Log: enabled qa-functional tests and removed dependency on j2seproject (#178009)