Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323847 - "test.vm.args" property isn't working correctly
Summary: "test.vm.args" property isn't working correctly
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris Frost CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-27 11:27 EDT by Borislav Kapukaranov CLA
Modified: 2010-09-15 04:44 EDT (History)
2 users (show)

See Also:
glyn.normington: documentation+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Borislav Kapukaranov CLA 2010-08-27 11:27:53 EDT
Build Identifier: unspecified

Build Identifier: 2.1.0.M03-incubation 

Changing "test.vm.args" property located in virgo-build/common/common.properties doesn't affect the test VMs.
I tried to set a debug parameter that suspends the VM using that property. 
It is referred in the virgo-build/common/quality.xml on line 237 (in the test-run macro definition). As a result the VM did not suspend and proceeded with the test execution normally.
After that i replaced ${test.vm.args} in
<jvmarg  line="${test.vm.args}"/> with the actual debug parameters that suspend a VM - i basically hardcoded them.
Then i executed the tests again and the test VM suspended as expected.

Although i'm not very proficient with ant scripts I suspect the issue here is that the property is not referred correctly and isn't looked up from the common.properties file at all. 



Reproducible: Always

Steps to Reproduce:
1. Set test.vm.args property in virgo-build/common/common.properties with some VM suspending value (e.g. debug parameters that suspend the vm)
2. Run the test suite
3. The test VMs won't suspend
Comment 1 Glyn Normington CLA 2010-08-31 10:38:55 EDT
Some background information may be useful as discussed in today's community call.

test.vm.args are set in a git-repository wide properties file such as:

org.eclipse.virgo.kernel/build.properties

which includes the following lines:

test.vm.args= -Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError
#test.vm.args= -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

We have successfully appended the second set of arguments to the first line to turn on debugging and suspend the debugger before the test starts.

This is not the same as setting the property per project, but it at least proves the property works in some circumstances.
Comment 2 Borislav Kapukaranov CLA 2010-09-02 09:14:51 EDT
Setting the arguments in the build.properties file worked.
I still wonder why that property(test.vm.args) exists in the virgo-build/common/common.properties file as well.
Is there any documentation on that because maybe it is a good idea to put a line or two somewhere, maybe on http://wiki.eclipse.org/Virgo/Test. It is a bit confusing to have the same property in two files while setting it only works in one of them :).

Using the build.properties file works great for me. Thanks.

I'll leave the bug open for now in case you decide to document the property in the Virgo test page or somewhere else.(In reply to comment #1)
> Some background information may be useful as discussed in today's community
> call.
> 
> test.vm.args are set in a git-repository wide properties file such as:
> 
> org.eclipse.virgo.kernel/build.properties
> 
> which includes the following lines:
> 
> test.vm.args= -Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError
> #test.vm.args= -Xdebug
> -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
> 
> We have successfully appended the second set of arguments to the first line to
> turn on debugging and suspend the debugger before the test starts.
> 
> This is not the same as setting the property per project, but it at least
> proves the property works in some circumstances.
Comment 3 Steve Powell CLA 2010-09-08 06:21:03 EDT
I think the idea is that the virgo-build (inherited from spring-build) build repo is designed to provide a test.vm.args property in case there isn't one in the build.properties file for the repository.

In fact, all the settings in build.properties override settings in the virgo-build target collections.

I guess it would be a good idea to comment the settings in the ant-targets in virgo-build so that there is no confusion.

Furthermore -- the test.vm.args property >could< be overridden on a project basis, provided there was a project properties file we could use. Either there is one already (but we don't use it) or else we could invent one, and put it in the ant processing at the appropriate point, to allow test.vm.args to be temporarily (or permanently) overridden for a single project.

Chris is the one to look at this, as he has had most experience in the virgo-build area.
Comment 4 Glyn Normington CLA 2010-09-15 04:44:23 EDT
test.vm.args, along with other test-related build propertes, are now documented on the wiki (http://wiki.eclipse.org/Virgo/Test#build.properties).