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 82202 - Test-test dependencies do not work in IDE until nbbuild/build/testdist/unit/**/tests.jar built
Summary: Test-test dependencies do not work in IDE until nbbuild/build/testdist/unit/*...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (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:31 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:31:16 UTC
1. If you have a newly built source tree and you open

ant/project/test/unit/src/org/netbeans/api/project/ant/AntArtifactQueryTest.java

you will get error markings; e.g. the import

import org.netbeans.api.project.TestUtil;

will be marked as an error.

2. Now run projects/projectapi/build.xml#test and reopen the file. It will show
no compilation errors... but code completion on TestUtil will not work.

So I think you forgot to do two things:

1. Make sure FileOwnerQuery knows that e.g.

nbbuild/build/testdist/unit/ide8/org-netbeans-modules-projectapi/tests.jar

belongs to

projects/projectapi

2. Make sure SourceForBinaryQuery knows that e.g.

nbbuild/build/testdist/unit/ide8/org-netbeans-modules-projectapi/tests.jar

corresponds to

projects/projectapi/test/unit/src

Both of these things should be quite easy to verify in a unit test. Note that
both queries should return the correct result whether or not tests.jar actually
exists at the time. (In the case of FileOwnerQuery, querying on FileObject for a
nonexistent file is impossible, but the query on URI should give the correct
result.)
Comment 1 pzajac 2006-08-11 10:03:40 UTC
TestEntry.java:
I am not sure if I can hardcode relative path to tests in  test in
tesDistribution.  

A src/org/netbeans/modules/apisupport/project/universe/TestEntry.java
A test/unit/data/example-external-projects/suite4
A test/unit/src/org/netbeans/modules/apisupport/project/universe/TestEntryTest.java
M src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java
M src/org/netbeans/modules/apisupport/project/queries/SourceForBinaryImpl.java
M
src/org/netbeans/modules/apisupport/project/queries/UpdateTrackingFileOwnerQuery.java
M test/unit/src/org/netbeans/modules/apisupport/project/TestBase.java
M
test/unit/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImplTest.java
M
test/unit/src/org/netbeans/modules/apisupport/project/queries/SourceForBinaryImplTest.java