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 82204 - Test-test dependencies do not work for external modules
Summary: Test-test dependencies do not work for external modules
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: pzajac
URL:
Keywords:
Depends on:
Blocks: 54161
  Show dependency tree
 
Reported: 2006-08-08 22:41 UTC by Jesse Glick
Modified: 2006-11-03 19:38 UTC (History)
0 users

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 Jesse Glick 2006-08-08 22:41:48 UTC
I created a suite with two modules. First one had

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.apisupport.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
            <code-name-base>org.yourorghere.module1</code-name-base>
            <suite-component/>
            <module-dependencies>
                <dependency>
                    <code-name-base>org.openide.actions</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.6.0.1</specification-version>
                    </run-dependency>
                </dependency>
            </module-dependencies>
            <public-packages/>
        </data>
    </configuration>
</project>

and contained

module1/test/unit/src/module1test/Foo.java:
package module1test;
public class Foo {
    public Foo() {
    }
}

Second one had

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.apisupport.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
            <code-name-base>org.yourorghere.module2</code-name-base>
            <suite-component/>
            <module-dependencies>
                <dependency>
                   
<code-name-base>org.netbeans.libs.commons_logging</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.4</specification-version>
                    </run-dependency>
                </dependency>
            </module-dependencies>
            <test-dependencies>
                <test-type>
                    <name>unit</name>
                    <test-dependency>
                        <code-name-base>org.yourorghere.module1</code-name-base>
                        <compile-dependency/>
                        <test/>
                    </test-dependency>
                </test-type>
            </test-dependencies>
            <public-packages/>
        </data>
    </configuration>
</project>

and contained

module2/test/unit/src/module2test/Bar.java:
package module2test;
public class Bar {
    public Bar() {
        new module1test.Foo();
    }
}

The usage of Foo from Bar is marked as an error in the editor; and Bar.java
cannot be built, even after module1's tests are built as

module1/build/test/unit/dist/tests.jar
Comment 1 pzajac 2006-08-11 13:13:55 UTC
There are two problems:
1. the cluster name is not initialized for external modules. Fixed in:
nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java, v 1.46

2. When test-type is not declared in project.xml for unit and qa-functional
testsChecking in antsrc/org/netbeans/nbbuild/ParseProjectXml.java;
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java,v  <-- 
ParseProjectXml.java
new revision: 1.47; previous revision: 1.46
done
Checking in test/build-unit.xml;
/cvs/nbbuild/test/build-unit.xml,v  <--  build-unit.xml
new revision: 1.9; previous revision: 1.8
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDeps.xml;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/TestDeps.xml,v  <--  TestDeps.xml
new revision: 1.6; previous revision: 1.5
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml,v  <-- 
TestDepsProject.xml
new revision: 1.4; previous revision: 1.3
done
RCS file:
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsProjectNoTestDeps.xml,v
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDepsProjectNoTestDeps.xml;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsProjectNoTestDeps.xml,v
 <--  TestDepsProjectNoTestDeps.xml
initial revision: 1.1
done
Checking in test/unit/src/org/netbeans/nbbuild/TestDepsTest.java;
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsTest.java,v  <-- 
TestDepsTest.java
new revision: 1.3; previous revision: 1.2