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.
Is is regression caused by Honza's commit: http://hg.netbeans.org/main?cmd=changeset;node=ed7376ef0dcc If you have $NB_HG_MAIN/some.module which does not have 'test/unit/data' subfolder, running single test from IDE might be broken, since harness is bypassed. Thus it might fail, e.g. in cases your tests using some.module/nbproject/project.properties#test-unit-sys-prop* properties. Not easy to find (found by debugging) -> P2. Workaround is simple 'mkdir -p some.module/test/unit/data', once one knows.
Forgot to CC Honza. Honzo see original comment.
A duplicity, but thanks a lot for pointer and workaround :). *** This issue has been marked as a duplicate of 141246 ***
61m2 ???
I don't think this is a duplicate. Martin's problem is that test-unit-sys-prop.* fail to be defined in the test JVM. The problem in issue #141246 is that the classpath is wrong. This is not really a regression from #ed7376ef0dcc, which just corrected some bogus logic. The problem is that jlahoda's original implementation of NBM test-single using ProjectRunner is just not right - it fails to pass any system properties whatsoever, when a number of properties are passed by the harness.
> Martin's problem is that test-unit-sys-prop.* That was just example of my problem. More things are wrong, so might be the same issue. The problem is that when the folder does not exist, running single test from the IDE (S-F6 on test) ends up in calling ModuleActions#bypassAntBuildScript and thus target: $userdir/var/cache/executor-snippets/junit.xml#test Build sequence for target(s) `test' is [test] Complete build sequence is [test, ] .... But after creating a folder (or reverting Honza's patch), ModuleActions#setupTestSingle is used to prepare target (which is right thing): $hg_main/nbbuild/templates/common.xml#test-single Build sequence for target(s) `test-single' is [init-tasks, default.init, .... <long_list_of_targets>] So much more things then just test-unit-sys-prop.* are 'skipped'. Up to Richard whether really dupe or not, I don't know.
Lack of correct propagation of system properties is a bug I plan to fix soon. The fact that the "full" build scripts are ignored is not a bug - it is intentional (to take advantage of the compile-on-save feature). The intent is to bypass the ant scripts in usual cases, and resort to traditional build scripts is necessary. If you need "full"/traditional build scripts, simply place: quick.test.single=false into your project.properties. However, if you do this, we would like to hear the reasons why you cannot use the quick run, in order to decide whether such use case should (or could) be supported by the quick run.
> However, if you do this, we would like to hear the reasons why you cannot use the quick > run, in order to decide whether such use case should (or could) be supported by the quick run. So far, I personally only have problem with non-propagation of test system properties.
I have not encountered the problem with test-unit-sys-prop.* yet (that I know of); my main problem is with the CP, which as described in issue #141246 is quite different from that used by the full build script. Good to know about quick.test.single=false, I will use that as a workaround for now (best to leave it in private.properties only I guess).
Support fox system properties (also for J2SE Projects): http://hg.netbeans.org/main/rev/171cfde69ddb
Integrated into 'main-golden', available in build *200808030201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/171cfde69ddb User: Jan Lahoda <jlahoda@netbeans.org> Log: #142028: support for system properties in quick run/test.