Bug 54161 - Set dependencies between projects' tests
Set dependencies between projects' tests
Status: RESOLVED FIXED
Product: apisupport
Classification: Unclassified
Component: Project
4.x
All All
: P2 (vote)
: 6.x
Assigned To: apireviews
issues@apisupport
http://apisupport.netbeans.org/TestDi...
: API_REVIEW_FAST
: 62668 72806 (view as bug list)
Depends on: 80704 80824 81841 82023 82193 82194 82195 82202 82204 82388 82910 83700 83874 83880
Blocks: 52354 71859 72806
  Show dependency treegraph
 
Reported: 2005-01-28 14:53 UTC by Milan Kubec
Modified: 2006-11-03 19:38 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
diff with changes (available in branch testdep_54161) (24.11 KB, patch)
2006-07-12 14:55 UTC, pzajac
Details | Diff
unified diff (44.69 KB, patch)
2006-07-14 18:42 UTC, pzajac
Details | Diff
changes in apisupport/harness (2.24 KB, application/octet-stream)
2006-07-14 18:49 UTC, pzajac
Details
diff between nb-module-project2.xsd and nb-module-project3.xsd (2.04 KB, patch)
2006-07-20 13:42 UTC, pzajac
Details | Diff
new version of diff between nb-module-project2.xsd and nb-module-project3.xsd (2.10 KB, patch)
2006-07-20 14:19 UTC, pzajac
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-01-28 14:53:31 UTC
There should be dependencies correctly set for all
projects' tests. Currently it's not possible to
run tests for java/project untill building tests
for projects/projectapi and ant/project. Don't
know about other unsatisfied deps.
Comment 1 Jesse Glick 2005-04-05 01:02:03 UTC
Workaround for a couple of cases (not for XTest, for in-IDE testing):

committed   * Up-To-Date  1.5         ant/project/build.xml
committed   * Up-To-Date  1.4         apisupport/project/build.xml
Comment 2 Jesse Glick 2005-04-15 21:02:58 UTC
Would require some kind of declaration in project.xml for test dependencies

- for unit tests as well for other kinds like qa-functional

- compile-time deps vs. runtime-only deps

Could also be used to remove the need to specify Class-Path extensions
explicitly (q.v. issue #52354).
Comment 3 Jesse Glick 2005-08-03 22:33:01 UTC
Should also allow you to omit entries from test.unit.run.cp.extra which are
modules in the dep list of some module this module deps on. Otherwise you have
to manually compute the transitive closure of modules from this one just to get
typical unit tests to run, which is no fun.
Comment 4 Jesse Glick 2005-08-19 22:17:35 UTC
*** Issue 62668 has been marked as a duplicate of this issue. ***
Comment 5 pzajac 2005-12-14 13:15:20 UTC
50HR Target milestone 5.0 -> TBD 
Comment 6 Jesse Glick 2006-02-19 14:06:27 UTC
*** Issue 72806 has been marked as a duplicate of this issue. ***
Comment 7 pzajac 2006-06-02 16:07:19 UTC
I added parsing ability to ParseProjectXML task into testdep_54161 branch.


/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsProject.xml,v
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsProject.xml,v  <--
 TestDepsProject.xml
new revision: 1.1.2.1; previous revision: 1.1
done
RCS file: /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsTest.java,v
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDepsTest.java;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsTest.java,v  <-- 
TestDepsTest.java
new revision: 1.1.2.1; previous revision: 1.1
done
RCS file: /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDeps.xml,v
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDeps.xml;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDeps.xml,v  <-- 
TestDeps.xml
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in antsrc/org/netbeans/nbbuild/ParseProjectXml.java;
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java,v  <-- 
ParseProjectXml.java
new revision: 1.40.18.1; previous revision: 1.40
done
Comment 8 Jiri Skrivanek 2006-06-05 15:05:00 UTC
I don't like project.xml structure. It is far from original proposal. I think
<test-groups> and <test-group> elements are something new in tests terminology.
At least I would use test-types/test-type. Or rather something like this:

            </module-dependencies>
            <test-dependencies test-type="unit">
                <dependency>
                    <code-name-base>org.openide.util</code-name-base>
                    <compile-dependency/>
                </dependency>/
                <dependency>
                    <code-name-base>org.openide.filesystems</code-name-base>
                    <compile-dependency/>
                    <run-dependency>
                        <recursive/>
                    </run-dependency>
                </dependency>
                <dependency>
                    <test/>
                    <code-name-base>org.openide.filesystems</code-name-base>
                </dependency>
            </test-dependecies>
Comment 9 pzajac 2006-06-06 09:05:05 UTC
I can change it. 

<test-dependencies test-type="unit">
I am for to move test-type="unit" to element:

<test-type>unit</test-type>

Why to specify <recursive> only for run-dependency ? 
  <run-dependency>
     <recursive/>
  </run-dependency>
 
Comment 10 Jiri Skrivanek 2006-06-06 09:51:27 UTC
> I am for to move test-type="unit" to element: <test-type>unit</test-type>

I am not against it.

> Why to specify <recursive> only for run-dependency ? 

It was just an example. It didn't show every possible case.
Comment 11 pzajac 2006-07-12 14:52:29 UTC
Test dependencies for test are described in first chapter of 
http://apisupport.netbeans.org/TestDistAndDep.html
document. 

Comment 12 pzajac 2006-07-12 14:55:39 UTC
Created attachment 31767 [details]
diff with changes (available in branch testdep_54161)
Comment 13 pzajac 2006-07-14 18:42:09 UTC
Created attachment 31897 [details]
unified diff
Comment 14 pzajac 2006-07-14 18:49:01 UTC
Created attachment 31898 [details]
changes in apisupport/harness
Comment 15 Jaroslav Tulach 2006-07-17 08:25:25 UTC
Y01 I can see that the templates/common.xml is now supposed to know something 
about qa-functional test. Jesse shall decide, but I guess this is wrong, afaik 
common.xml was supposed to be qa-functional independent and support only unit 
tests.
Comment 16 Jaroslav Tulach 2006-07-17 08:29:27 UTC
Y02 Following references in common.xml are not very nice:
+            <pathelement path="${nb_all}/jellytools/builds/jelly2-nb.jar"/>
+            <pathelement location="${nb_all}/jemmy/builds/jemmy.jar"/>
and imho shall be avoided. Maybe they are acceptable in projectized.xml, but 
still not nice, imho.
Comment 17 pzajac 2006-07-17 10:00:08 UTC
Y01 I can move tasks for building qa-functional tests to projectized.xml. It is
better to build test by netbeans harness than by xtest. Do you agree?

The problem can be solved by project natures, BTW.  

Y02 Ok I will move it to projectized.xml.  
Comment 18 pzajac 2006-07-18 22:08:11 UTC
Intergrated to trunk:
User: pzajac  
Date: 2006/07/18 13:17:46

Added:
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesPass.properties
   nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsTest.java
   nbbuild/test/unit/src/org/netbeans/nbbuild/ShorterPathsTest.java
   nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml
   nbbuild/test/unit/src/org/netbeans/nbbuild/TestDeps.xml
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesTest.java
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProject.xml
   nbbuild/test/unit/src/org/netbeans/nbbuild/ShorterPathsTest.xml
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesTest.xml
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependencies.properties
   nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProjectPass.xml
   nbbuild/templates/testdist/unit-all-unit.xml
   nbbuild/templates/testdist/xtest-build.xml
   nbbuild/templates/testdist/xtest-all-unit.xml
   nbbuild/templates/testdist/all-unit.properties
   nbbuild/templates/testdist/unit-unit.xml
   nbbuild/antsrc/org/netbeans/nbbuild/FixTestDependencies.java
   nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java

Modified:
   xtest/lib/module_harness.xml
   nbbuild/templates/xtest.xml
   nbbuild/templates/xtest-unit.xml
   nbbuild/templates/projectized.xml
   nbbuild/templates/common.xml
   nbbuild/templates/xtest-qa-functional.xml
   xtest/plugins_src/base/lib/basic_compiler_targets.xml
   xtest/plugins_src/base/lib/basic_packager_targets.xml
   apisupport/harness/release/build.xml
   nbbuild/build.properties
   nbbuild/default-properties.xml
   nbbuild/default.xml
   nbbuild/build.xml
   nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
   nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java
   apisupport/harness/taskdefs.properties
   nbbuild/test/build-unit.xml
   xtest/src/org/netbeans/xtest/harness/MTestExecutor.java

Modified:
   ant/grammar/nbproject/project.xml
   ant/grammar/nbproject/project.properties
   core/execution/nbproject/project.xml
   core/execution/nbproject/project.properties
   openide/fs/nbproject/project.xml
   web/jspsyntax/nbproject/project.properties
   web/jspsyntax/nbproject/project.xml
   openide/masterfs/nbproject/project.properties
   openide/masterfs/nbproject/project.xml
   openide/util/nbproject/project.xml
   openide/util/nbproject/project.properties
   openide/compat/nbproject/project.xml
   diff/nbproject/project.xml
   ide/test/build-qa-functional.xml
   core/startup/nbproject/project.xml
   core/startup/nbproject/project.properties
   projects/projectapi/nbproject/project.properties
   projects/projectapi/nbproject/project.xml
   projects/libraries/nbproject/project.properties
   projects/libraries/nbproject/project.xml
   core/output2/nbproject/project.properties
   core/output2/nbproject/project.xml
   web/freeform/nbproject/project.xml
   web/freeform/nbproject/project.properties
   core/settings/nbproject/project.properties
   core/settings/nbproject/project.xml
   xml/multiview/nbproject/project.properties
   xml/multiview/nbproject/project.xml
   java/project/nbproject/project.xml
   java/project/nbproject/project.properties
   html/editor/nbproject/project.xml
   html/editor/nbproject/project.properties
   ant/freeform/nbproject/project.xml
   ant/freeform/nbproject/project.properties
   j2ee/ejbfreeform/nbproject/project.properties
   j2ee/ejbfreeform/nbproject/project.xml
   ant/nbproject/project.xml
   ant/nbproject/project.properties
   core/windows/nbproject/project.properties
   core/windows/nbproject/project.xml
   j2ee/ejbapi/nbproject/project.xml
   java/j2seplatform/nbproject/project.properties
   java/j2seplatform/nbproject/project.xml
   java/freeform/nbproject/project.xml
   java/freeform/nbproject/project.properties
   openide/loaders/nbproject/project.properties
   openide/loaders/nbproject/project.xml
   web/webapi/nbproject/project.xml
   core/bootstrap/nbproject/project.xml
   core/bootstrap/nbproject/project.properties
   java/j2seproject/nbproject/project.properties
   java/j2seproject/nbproject/project.xml
   html/editor/lib/nbproject/project.xml
   html/editor/lib/nbproject/project.properties
   html/nbproject/project.properties
   html/nbproject/project.xml
   xml/text-edit/nbproject/project.properties
   xml/text-edit/nbproject/project.xml
   xml/tageditorsupport/nbproject/project.properties
   xml/tageditorsupport/nbproject/project.xml
   j2ee/ddapi/nbproject/project.xml
   j2ee/ddapi/nbproject/project.properties
   openide/modules/nbproject/project.xml
   ide/launcher/upgrade/nbproject/project.xml
   refactoring/test/build-qa-functional.xml
   ant/project/nbproject/project.xml
   ant/project/nbproject/project.properties
   core/favorites/nbproject/project.xml
   core/favorites/nbproject/project.properties
   debuggerjpda/nbproject/project.xml
   autoupdate/nbproject/project.xml
   db/nbproject/project.properties
   db/nbproject/project.xml
   openide/nodes/nbproject/project.xml
   j2ee/ddloaders/nbproject/project.xml
   core/nbproject/project.xml
   core/nbproject/project.properties
   openide/dialogs/nbproject/project.xml
   projects/projectui/nbproject/project.xml
   projects/projectui/nbproject/project.properties
   web/project/nbproject/project.properties
   web/project/nbproject/project.xml
   core/javahelp/nbproject/project.xml
   openide/options/nbproject/project.xml
   openide/actions/nbproject/project.xml
   openide/windows/nbproject/project.xml
   openide/explorer/nbproject/project.xml
   openide/execution/nbproject/project.xml
   tomcatint/tomcat5/nbproject/project.xml
   j2eeserver/nbproject/project.xml


Comment 19 Jiri Skrivanek 2006-07-19 10:54:27 UTC
1) There is an issue 57379 to build jellytools before qa-functional tests are
run. It is handled in xtest-qa-functional.xml and it should be added to
projectized.xml.

2) There is a bug in parsing. If you have:

                    <test-dependency>
                        <code-name-base>org.openide.windows</code-name-base>
                        <compile-dependency/>
                    </test-dependency>

It is parsed both to compilecp and runtimecp properties. But it should be only
in compilecp.

                      
Comment 20 pzajac 2006-07-19 11:16:52 UTC
1) it's mean to add building of jellytools and jemmy to projectized.xml

2) It is another requirement 

There are only 2 scenarios now
a)runtime + compile dependency
                <test-dependency>
                        <code-name-base>org.openide.windows</code-name-base>
                        <compile-dependency/>
                 </test-dependency>
b)runtime dependency
                <test-dependency>
                        <code-name-base>org.openide.windows</code-name-base>
                 </test-dependency>

Do you really need compile dependency without runtime dependency?
Comment 21 Jiri Skrivanek 2006-07-19 11:51:11 UTC
> Do you really need compile dependency without runtime dependency?

Yes, for tests executed in IDE mode I need IDE jars on compilation classpath but
not on runtime classpath. But I can't think of use case where I need only
runtime dependency. I think there should be only compile dependency and
compile+runtime.
Comment 22 pzajac 2006-07-19 12:58:12 UTC
Test executed in ide mode has only special libraries on classpath. The libraries
are not modularized so they are not defined in project.xml. 

The special librararies are defined in property. The new solution is compatible
with the old property based. It works well.

What's your real requirement?  

Comment 23 Jiri Skrivanek 2006-07-19 13:31:04 UTC
For example in module apisupport/refactoring there is defined compilation
classpath for qa-functional tests in propect.properties. Now it is possible to
move this definition from project.properties to project.xml. But this is only
compilation classpath and you cannot define only compilation classpath in
project.xml.
Comment 24 pzajac 2006-07-19 14:11:40 UTC
The runtime classpath of the apisupport/refactoring is defined by netbeans
module system : 
    <property name="xtest.ide.use.classloader"
value="org.netbeans.modules.apisupport.refactoring"/>

Are you really able to add netbeans modules to runtime classpath of tests in ide
mode?  

I transfered test dependencies only for modules declared in masterconfig.xml.
The conversion can be simply done by executing fix-test-dependencies ant target
in module. 

 
Comment 25 Jesse Glick 2006-07-20 04:40:21 UTC
I still need to review this thoroughly (just haven't had time yet), but one
immediate comment: you cannot just add new elements to the existing
http://www.netbeans.org/ns/nb-module-project/2.xsd. You must create and publish
a /3 version (and fix all parsing code to accept either /2 or /3).
Comment 26 Jesse Glick 2006-07-20 05:15:52 UTC
Also a complete description of the new format should be included in
apisupport/harness/release/README.
Comment 27 Jesse Glick 2006-07-20 05:46:22 UTC
*** Issue 72806 has been marked as a duplicate of this issue. ***
Comment 28 pzajac 2006-07-20 13:42:11 UTC
Created attachment 32046 [details]
diff between nb-module-project2.xsd and nb-module-project3.xsd
Comment 29 pzajac 2006-07-20 13:47:00 UTC
I forgot on the xml schema update. It strange that everything is working with
the previous schema version /2. I attached diff between versions /2 and /3. I
don't know how to upload the the new version. 
Comment 30 pzajac 2006-07-20 14:19:28 UTC
Created attachment 32047 [details]
new version of diff between nb-module-project2.xsd and nb-module-project3.xsd
Comment 31 Jesse Glick 2006-07-24 18:47:39 UTC
What is nbbuild/templates/testdist/all-unit.properties? It looks to be
mechanically generated. If so, why is it in CVS?
Comment 32 pzajac 2006-08-07 17:52:24 UTC
The all-unit.properties file will be cobiled copied to binary test distribution.
It contains all folders with tests in binary tests distribution. Yes, the file
can be automatically generated. 
Comment 33 Jesse Glick 2006-08-08 19:02:12 UTC
I guess this can be considered fixed with blocking issues, most significantly 
issue #80824 re. schema versioning which I will try to address.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo