You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2009/06/25 16:18:05 UTC
Test jars in the hdk (was: svn commit: r787957)
Sean,
Nice work!
I notice that this change causes the hdk to contain
build/test/properties.xml and the identical file
build/ant/properties.xml. Perhaps we can just reference the
build/ant/properties.xml version rather than make another copy.
I think we should call the 'test-jar' target as part of the top-level
"build" target since I think we really want to the hdk to be complete
after the "build" step. (Much like we currently build the test support
jar.)
BTW, I think the targets in modules/luni/build.xml can be simplified.
For instance, the "-test-module" depends can be reduced to:
build, test-jar, run-tests
which is a bit more readable (since "test-jar" already depends on
"compile-tests, prepare-exclude").
I did LOL when I saw that this change causes the following new line
in my build output (on Aix):
[copy] Copied 14 empty directories to 2 empty directories under
deploy/build/test/luni/resources
Perhaps
-Mark
In message <20...@eris.apache.org>, qiuxx@apache.org
writes:
>
> Author: qiuxx
> Date: Wed Jun 24 09:28:55 2009
> New Revision: 787957
>
> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
> Log:
> Add a top task to archive all tests into jar files independent on test task,
> make testing archiving more convenient.
>
> Modified:
> harmony/enhanced/classlib/trunk/build.xml
> harmony/enhanced/classlib/trunk/make/build-test.xml
> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>
> Modified: harmony/enhanced/classlib/trunk/build.xml
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
> ev=787957&r1=787956&r2=787957&view=diff
> =============================================================================
> =
> --- harmony/enhanced/classlib/trunk/build.xml (original)
> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
> @@ -174,6 +174,15 @@
> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
> ll"/>
> </target>
>
> + <target name="test-jar" depends="-init-hdk"
> + description="Jar all tests">
> + <echo>
> +========================================
> +Archive testing classes ...
> +========================================
> +</echo>
> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
> ar-modules"/>
> + </target>
>
> <!-- =================================
> target: doc
>
> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
> test.xml?rev=787957&r1=787956&r2=787957&view=diff
> =============================================================================
> =
> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
> 009
> @@ -39,7 +39,7 @@
>
> <!-- this list of components to test will grow to eventually be all modu
> les -->
> <target name="test-all"
> - depends="clean-test-output, test-modules, process-test-output" /
> >
> + depends="clean-test-output, test-jar-init, test-modules, process
> -test-output" />
>
> <target name="process-test-output"
> depends="process-empty, gen-report, check-test-result" />
> @@ -56,9 +56,16 @@
> </target>
>
> <target name="test-modules" depends="support-jar, test-jre-vm-info">
> + <poll-modules target="-test-module" />
> + </target>
> +
> + <target name="test-jar-init">
> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
> /test/test.properties"/>
> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
> st/build.xml"/>
> - <poll-modules target="-test-module" />
> + </target>
> +
> + <target name="test-jar-modules" depends="test-jar-init">
> + <poll-modules target="test-jar" />
> </target>
>
> <target name="gen-report" depends="full-report,short-report" />
>
> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
> =============================================================================
> =
> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
> 5 2009
> @@ -297,7 +297,7 @@
> </jar>
> </target>
>
> - <target name="test-jar" depends="svn-info">
> + <target name="test-jar" depends="compile-tests, prepare-exclude">
> <mkdir dir="${tests.hdk.dir}"/>
>
> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
> pi.jar">
>
Re: Test jars in the hdk
Posted by Tim Ellison <t....@gmail.com>.
Sean Qiu wrote:
> Seems this patch can only applied once all modules' test-jar is ready.
> I will revert it back at this moment until I applied my remaining patches.
Sure. Once you get the test JARs into the HDK it would be good to
include the classlib tests as a target for the Hudson builds. At the
moment we are only running a small subset of the classlib tests on Hudson.
Regards,
Tim
> 2009/7/1 Sean Qiu <se...@gmail.com>:
>> http://svn.apache.org/viewvc?view=rev&revision=790030
>>
>> Now, our build phase consists of three parts.
>>
>> 1) build-java
>> 2) build-native
>> 3) build-test
>>
>> New added build-test would compile and archive test in this phase.
>>
>> Best Regards
>> Sean, Xiao Xia Qiu
>>
>>
>>
>>
>> 2009/6/30 Sean Qiu <se...@gmail.com>:
>>> Best Regards
>>> Sean, Xiao Xia Qiu
>>>
>>>
>>>
>>>
>>> 2009/6/25 Mark Hindess <ma...@googlemail.com>:
>>>> Sean,
>>>>
>>>> Nice work!
>>>>
>>>> I notice that this change causes the hdk to contain
>>>> build/test/properties.xml and the identical file
>>>> build/ant/properties.xml. Perhaps we can just reference the
>>>> build/ant/properties.xml version rather than make another copy.
>>>>
>>>> I think we should call the 'test-jar' target as part of the top-level
>>>> "build" target since I think we really want to the hdk to be complete
>>>> after the "build" step. (Much like we currently build the test support
>>>> jar.)
>>> One concern here, if you include test-jar in build, it mean that we
>>> must compile all tests in build phase
>>> which we done before in test phase.
>>>
>>> If no one object this modification, I will supply the patch.
>>>
>>>
>>>> BTW, I think the targets in modules/luni/build.xml can be simplified.
>>>> For instance, the "-test-module" depends can be reduced to:
>>>>
>>>> build, test-jar, run-tests
>>>>
>>>> which is a bit more readable (since "test-jar" already depends on
>>>> "compile-tests, prepare-exclude").
>>>>
>>>> I did LOL when I saw that this change causes the following new line
>>>> in my build output (on Aix):
>>>>
>>>> [copy] Copied 14 empty directories to 2 empty directories under
>>>> deploy/build/test/luni/resources
>>>>
>>>> Perhaps
>>>> -Mark
>>>>
>>>> In message <20...@eris.apache.org>, qiuxx@apache.org
>>>> writes:
>>>>> Author: qiuxx
>>>>> Date: Wed Jun 24 09:28:55 2009
>>>>> New Revision: 787957
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
>>>>> Log:
>>>>> Add a top task to archive all tests into jar files independent on test task,
>>>>> make testing archiving more convenient.
>>>>>
>>>>> Modified:
>>>>> harmony/enhanced/classlib/trunk/build.xml
>>>>> harmony/enhanced/classlib/trunk/make/build-test.xml
>>>>> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>>>>
>>>>> Modified: harmony/enhanced/classlib/trunk/build.xml
>>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
>>>>> ev=787957&r1=787956&r2=787957&view=diff
>>>>> =============================================================================
>>>>> =
>>>>> --- harmony/enhanced/classlib/trunk/build.xml (original)
>>>>> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
>>>>> @@ -174,6 +174,15 @@
>>>>> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
>>>>> ll"/>
>>>>> </target>
>>>>>
>>>>> + <target name="test-jar" depends="-init-hdk"
>>>>> + description="Jar all tests">
>>>>> + <echo>
>>>>> +========================================
>>>>> +Archive testing classes ...
>>>>> +========================================
>>>>> +</echo>
>>>>> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
>>>>> ar-modules"/>
>>>>> + </target>
>>>>>
>>>>> <!-- =================================
>>>>> target: doc
>>>>>
>>>>> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
>>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
>>>>> test.xml?rev=787957&r1=787956&r2=787957&view=diff
>>>>> =============================================================================
>>>>> =
>>>>> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
>>>>> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
>>>>> 009
>>>>> @@ -39,7 +39,7 @@
>>>>>
>>>>> <!-- this list of components to test will grow to eventually be all modu
>>>>> les -->
>>>>> <target name="test-all"
>>>>> - depends="clean-test-output, test-modules, process-test-output" /
>>>>> + depends="clean-test-output, test-jar-init, test-modules, process
>>>>> -test-output" />
>>>>>
>>>>> <target name="process-test-output"
>>>>> depends="process-empty, gen-report, check-test-result" />
>>>>> @@ -56,9 +56,16 @@
>>>>> </target>
>>>>>
>>>>> <target name="test-modules" depends="support-jar, test-jre-vm-info">
>>>>> + <poll-modules target="-test-module" />
>>>>> + </target>
>>>>> +
>>>>> + <target name="test-jar-init">
>>>>> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
>>>>> /test/test.properties"/>
>>>>> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
>>>>> st/build.xml"/>
>>>>> - <poll-modules target="-test-module" />
>>>>> + </target>
>>>>> +
>>>>> + <target name="test-jar-modules" depends="test-jar-init">
>>>>> + <poll-modules target="test-jar" />
>>>>> </target>
>>>>>
>>>>> <target name="gen-report" depends="full-report,short-report" />
>>>>>
>>>>> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
>>>>> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
>>>>> =============================================================================
>>>>> =
>>>>> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
>>>>> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
>>>>> 5 2009
>>>>> @@ -297,7 +297,7 @@
>>>>> </jar>
>>>>> </target>
>>>>>
>>>>> - <target name="test-jar" depends="svn-info">
>>>>> + <target name="test-jar" depends="compile-tests, prepare-exclude">
>>>>> <mkdir dir="${tests.hdk.dir}"/>
>>>>>
>>>>> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
>>>>> pi.jar">
>>>>>
>>>>
>>>>
>
Re: Test jars in the hdk (was: svn commit: r787957)
Posted by Sean Qiu <se...@gmail.com>.
Seems this patch can only applied once all modules' test-jar is ready.
I will revert it back at this moment until I applied my remaining patches.
Best Regards
Sean, Xiao Xia Qiu
2009/7/1 Sean Qiu <se...@gmail.com>:
> http://svn.apache.org/viewvc?view=rev&revision=790030
>
> Now, our build phase consists of three parts.
>
> 1) build-java
> 2) build-native
> 3) build-test
>
> New added build-test would compile and archive test in this phase.
>
> Best Regards
> Sean, Xiao Xia Qiu
>
>
>
>
> 2009/6/30 Sean Qiu <se...@gmail.com>:
>> Best Regards
>> Sean, Xiao Xia Qiu
>>
>>
>>
>>
>> 2009/6/25 Mark Hindess <ma...@googlemail.com>:
>>>
>>> Sean,
>>>
>>> Nice work!
>>>
>>> I notice that this change causes the hdk to contain
>>> build/test/properties.xml and the identical file
>>> build/ant/properties.xml. Perhaps we can just reference the
>>> build/ant/properties.xml version rather than make another copy.
>>>
>>> I think we should call the 'test-jar' target as part of the top-level
>>> "build" target since I think we really want to the hdk to be complete
>>> after the "build" step. (Much like we currently build the test support
>>> jar.)
>>
>> One concern here, if you include test-jar in build, it mean that we
>> must compile all tests in build phase
>> which we done before in test phase.
>>
>> If no one object this modification, I will supply the patch.
>>
>>
>>>
>>> BTW, I think the targets in modules/luni/build.xml can be simplified.
>>> For instance, the "-test-module" depends can be reduced to:
>>>
>>> build, test-jar, run-tests
>>>
>>> which is a bit more readable (since "test-jar" already depends on
>>> "compile-tests, prepare-exclude").
>>>
>>> I did LOL when I saw that this change causes the following new line
>>> in my build output (on Aix):
>>>
>>> [copy] Copied 14 empty directories to 2 empty directories under
>>> deploy/build/test/luni/resources
>>>
>>> Perhaps
>>> -Mark
>>>
>>> In message <20...@eris.apache.org>, qiuxx@apache.org
>>> writes:
>>>>
>>>> Author: qiuxx
>>>> Date: Wed Jun 24 09:28:55 2009
>>>> New Revision: 787957
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
>>>> Log:
>>>> Add a top task to archive all tests into jar files independent on test task,
>>>> make testing archiving more convenient.
>>>>
>>>> Modified:
>>>> harmony/enhanced/classlib/trunk/build.xml
>>>> harmony/enhanced/classlib/trunk/make/build-test.xml
>>>> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>>>
>>>> Modified: harmony/enhanced/classlib/trunk/build.xml
>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
>>>> ev=787957&r1=787956&r2=787957&view=diff
>>>> =============================================================================
>>>> =
>>>> --- harmony/enhanced/classlib/trunk/build.xml (original)
>>>> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
>>>> @@ -174,6 +174,15 @@
>>>> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
>>>> ll"/>
>>>> </target>
>>>>
>>>> + <target name="test-jar" depends="-init-hdk"
>>>> + description="Jar all tests">
>>>> + <echo>
>>>> +========================================
>>>> +Archive testing classes ...
>>>> +========================================
>>>> +</echo>
>>>> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
>>>> ar-modules"/>
>>>> + </target>
>>>>
>>>> <!-- =================================
>>>> target: doc
>>>>
>>>> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
>>>> test.xml?rev=787957&r1=787956&r2=787957&view=diff
>>>> =============================================================================
>>>> =
>>>> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
>>>> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
>>>> 009
>>>> @@ -39,7 +39,7 @@
>>>>
>>>> <!-- this list of components to test will grow to eventually be all modu
>>>> les -->
>>>> <target name="test-all"
>>>> - depends="clean-test-output, test-modules, process-test-output" /
>>>> >
>>>> + depends="clean-test-output, test-jar-init, test-modules, process
>>>> -test-output" />
>>>>
>>>> <target name="process-test-output"
>>>> depends="process-empty, gen-report, check-test-result" />
>>>> @@ -56,9 +56,16 @@
>>>> </target>
>>>>
>>>> <target name="test-modules" depends="support-jar, test-jre-vm-info">
>>>> + <poll-modules target="-test-module" />
>>>> + </target>
>>>> +
>>>> + <target name="test-jar-init">
>>>> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
>>>> /test/test.properties"/>
>>>> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
>>>> st/build.xml"/>
>>>> - <poll-modules target="-test-module" />
>>>> + </target>
>>>> +
>>>> + <target name="test-jar-modules" depends="test-jar-init">
>>>> + <poll-modules target="test-jar" />
>>>> </target>
>>>>
>>>> <target name="gen-report" depends="full-report,short-report" />
>>>>
>>>> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
>>>> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
>>>> =============================================================================
>>>> =
>>>> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
>>>> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
>>>> 5 2009
>>>> @@ -297,7 +297,7 @@
>>>> </jar>
>>>> </target>
>>>>
>>>> - <target name="test-jar" depends="svn-info">
>>>> + <target name="test-jar" depends="compile-tests, prepare-exclude">
>>>> <mkdir dir="${tests.hdk.dir}"/>
>>>>
>>>> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
>>>> pi.jar">
>>>>
>>>
>>>
>>>
>>
>
Re: Test jars in the hdk (was: svn commit: r787957)
Posted by Sean Qiu <se...@gmail.com>.
http://svn.apache.org/viewvc?view=rev&revision=790030
Now, our build phase consists of three parts.
1) build-java
2) build-native
3) build-test
New added build-test would compile and archive test in this phase.
Best Regards
Sean, Xiao Xia Qiu
2009/6/30 Sean Qiu <se...@gmail.com>:
> Best Regards
> Sean, Xiao Xia Qiu
>
>
>
>
> 2009/6/25 Mark Hindess <ma...@googlemail.com>:
>>
>> Sean,
>>
>> Nice work!
>>
>> I notice that this change causes the hdk to contain
>> build/test/properties.xml and the identical file
>> build/ant/properties.xml. Perhaps we can just reference the
>> build/ant/properties.xml version rather than make another copy.
>>
>> I think we should call the 'test-jar' target as part of the top-level
>> "build" target since I think we really want to the hdk to be complete
>> after the "build" step. (Much like we currently build the test support
>> jar.)
>
> One concern here, if you include test-jar in build, it mean that we
> must compile all tests in build phase
> which we done before in test phase.
>
> If no one object this modification, I will supply the patch.
>
>
>>
>> BTW, I think the targets in modules/luni/build.xml can be simplified.
>> For instance, the "-test-module" depends can be reduced to:
>>
>> build, test-jar, run-tests
>>
>> which is a bit more readable (since "test-jar" already depends on
>> "compile-tests, prepare-exclude").
>>
>> I did LOL when I saw that this change causes the following new line
>> in my build output (on Aix):
>>
>> [copy] Copied 14 empty directories to 2 empty directories under
>> deploy/build/test/luni/resources
>>
>> Perhaps
>> -Mark
>>
>> In message <20...@eris.apache.org>, qiuxx@apache.org
>> writes:
>>>
>>> Author: qiuxx
>>> Date: Wed Jun 24 09:28:55 2009
>>> New Revision: 787957
>>>
>>> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
>>> Log:
>>> Add a top task to archive all tests into jar files independent on test task,
>>> make testing archiving more convenient.
>>>
>>> Modified:
>>> harmony/enhanced/classlib/trunk/build.xml
>>> harmony/enhanced/classlib/trunk/make/build-test.xml
>>> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>>
>>> Modified: harmony/enhanced/classlib/trunk/build.xml
>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
>>> ev=787957&r1=787956&r2=787957&view=diff
>>> =============================================================================
>>> =
>>> --- harmony/enhanced/classlib/trunk/build.xml (original)
>>> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
>>> @@ -174,6 +174,15 @@
>>> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
>>> ll"/>
>>> </target>
>>>
>>> + <target name="test-jar" depends="-init-hdk"
>>> + description="Jar all tests">
>>> + <echo>
>>> +========================================
>>> +Archive testing classes ...
>>> +========================================
>>> +</echo>
>>> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
>>> ar-modules"/>
>>> + </target>
>>>
>>> <!-- =================================
>>> target: doc
>>>
>>> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
>>> test.xml?rev=787957&r1=787956&r2=787957&view=diff
>>> =============================================================================
>>> =
>>> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
>>> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
>>> 009
>>> @@ -39,7 +39,7 @@
>>>
>>> <!-- this list of components to test will grow to eventually be all modu
>>> les -->
>>> <target name="test-all"
>>> - depends="clean-test-output, test-modules, process-test-output" /
>>> >
>>> + depends="clean-test-output, test-jar-init, test-modules, process
>>> -test-output" />
>>>
>>> <target name="process-test-output"
>>> depends="process-empty, gen-report, check-test-result" />
>>> @@ -56,9 +56,16 @@
>>> </target>
>>>
>>> <target name="test-modules" depends="support-jar, test-jre-vm-info">
>>> + <poll-modules target="-test-module" />
>>> + </target>
>>> +
>>> + <target name="test-jar-init">
>>> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
>>> /test/test.properties"/>
>>> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
>>> st/build.xml"/>
>>> - <poll-modules target="-test-module" />
>>> + </target>
>>> +
>>> + <target name="test-jar-modules" depends="test-jar-init">
>>> + <poll-modules target="test-jar" />
>>> </target>
>>>
>>> <target name="gen-report" depends="full-report,short-report" />
>>>
>>> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
>>> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
>>> =============================================================================
>>> =
>>> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
>>> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
>>> 5 2009
>>> @@ -297,7 +297,7 @@
>>> </jar>
>>> </target>
>>>
>>> - <target name="test-jar" depends="svn-info">
>>> + <target name="test-jar" depends="compile-tests, prepare-exclude">
>>> <mkdir dir="${tests.hdk.dir}"/>
>>>
>>> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
>>> pi.jar">
>>>
>>
>>
>>
>
Re: Test jars in the hdk (was: svn commit: r787957)
Posted by Sean Qiu <se...@gmail.com>.
Best Regards
Sean, Xiao Xia Qiu
2009/6/25 Mark Hindess <ma...@googlemail.com>:
>
> Sean,
>
> Nice work!
>
> I notice that this change causes the hdk to contain
> build/test/properties.xml and the identical file
> build/ant/properties.xml. Perhaps we can just reference the
> build/ant/properties.xml version rather than make another copy.
>
> I think we should call the 'test-jar' target as part of the top-level
> "build" target since I think we really want to the hdk to be complete
> after the "build" step. (Much like we currently build the test support
> jar.)
One concern here, if you include test-jar in build, it mean that we
must compile all tests in build phase
which we done before in test phase.
If no one object this modification, I will supply the patch.
>
> BTW, I think the targets in modules/luni/build.xml can be simplified.
> For instance, the "-test-module" depends can be reduced to:
>
> build, test-jar, run-tests
>
> which is a bit more readable (since "test-jar" already depends on
> "compile-tests, prepare-exclude").
>
> I did LOL when I saw that this change causes the following new line
> in my build output (on Aix):
>
> [copy] Copied 14 empty directories to 2 empty directories under
> deploy/build/test/luni/resources
>
> Perhaps
> -Mark
>
> In message <20...@eris.apache.org>, qiuxx@apache.org
> writes:
>>
>> Author: qiuxx
>> Date: Wed Jun 24 09:28:55 2009
>> New Revision: 787957
>>
>> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
>> Log:
>> Add a top task to archive all tests into jar files independent on test task,
>> make testing archiving more convenient.
>>
>> Modified:
>> harmony/enhanced/classlib/trunk/build.xml
>> harmony/enhanced/classlib/trunk/make/build-test.xml
>> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>
>> Modified: harmony/enhanced/classlib/trunk/build.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
>> ev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/build.xml (original)
>> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
>> @@ -174,6 +174,15 @@
>> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
>> ll"/>
>> </target>
>>
>> + <target name="test-jar" depends="-init-hdk"
>> + description="Jar all tests">
>> + <echo>
>> +========================================
>> +Archive testing classes ...
>> +========================================
>> +</echo>
>> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
>> ar-modules"/>
>> + </target>
>>
>> <!-- =================================
>> target: doc
>>
>> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
>> test.xml?rev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
>> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
>> 009
>> @@ -39,7 +39,7 @@
>>
>> <!-- this list of components to test will grow to eventually be all modu
>> les -->
>> <target name="test-all"
>> - depends="clean-test-output, test-modules, process-test-output" /
>> >
>> + depends="clean-test-output, test-jar-init, test-modules, process
>> -test-output" />
>>
>> <target name="process-test-output"
>> depends="process-empty, gen-report, check-test-result" />
>> @@ -56,9 +56,16 @@
>> </target>
>>
>> <target name="test-modules" depends="support-jar, test-jre-vm-info">
>> + <poll-modules target="-test-module" />
>> + </target>
>> +
>> + <target name="test-jar-init">
>> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
>> /test/test.properties"/>
>> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
>> st/build.xml"/>
>> - <poll-modules target="-test-module" />
>> + </target>
>> +
>> + <target name="test-jar-modules" depends="test-jar-init">
>> + <poll-modules target="test-jar" />
>> </target>
>>
>> <target name="gen-report" depends="full-report,short-report" />
>>
>> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
>> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
>> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
>> 5 2009
>> @@ -297,7 +297,7 @@
>> </jar>
>> </target>
>>
>> - <target name="test-jar" depends="svn-info">
>> + <target name="test-jar" depends="compile-tests, prepare-exclude">
>> <mkdir dir="${tests.hdk.dir}"/>
>>
>> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
>> pi.jar">
>>
>
>
>
Re: Test jars in the hdk (was: svn commit: r787957)
Posted by Sean Qiu <se...@gmail.com>.
Best Regards
Sean, Xiao Xia Qiu
2009/6/25 Mark Hindess <ma...@googlemail.com>:
>
> Sean,
>
> Nice work!
>
> I notice that this change causes the hdk to contain
> build/test/properties.xml and the identical file
> build/ant/properties.xml. Perhaps we can just reference the
> build/ant/properties.xml version rather than make another copy.
>
The reason I copy another properties.xml here is to make the archived
test a separated unit.
It means that it could be simply copied or published as a independent component.
Other wise we need copy this file and that file to make it runnable.
What do you think about it?
> I think we should call the 'test-jar' target as part of the top-level
> "build" target since I think we really want to the hdk to be complete
> after the "build" step. (Much like we currently build the test support
> jar.)
Cool suggestion, our original task was part of ant test, which I
always thought there is something weird.
I have to wait until the test is finished to get the archive and yes,
I can cancel it, but it is another story :-)
It is much natural that test-jar be part of build, as we jar the
source code in this phase.
Will do it later.
>
> BTW, I think the targets in modules/luni/build.xml can be simplified.
> For instance, the "-test-module" depends can be reduced to:
>
> build, test-jar, run-tests
>
> which is a bit more readable (since "test-jar" already depends on
> "compile-tests, prepare-exclude").
>
I'm going to make it a little more clear within my next patch.
But I think your suggestion is a better solution and makes more sense.
Cool~~~
> I did LOL when I saw that this change causes the following new line
> in my build output (on Aix):
>
> [copy] Copied 14 empty directories to 2 empty directories under
> deploy/build/test/luni/resources
Hmm, mine on Linux, could you give more details about this?
--------------------
[copy] Copying 14 files to
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni
[mkdir] Created dir:
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni/resources/config
[copy] Copying 1 file to
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni/resources/config
[copy] Copying 53 files to
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni/resources
[mkdir] Created dir:
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni/excludes
[copy] Copying 12 files to
/home/xiaoxia/checkout/hdk/working_classlib/deploy/build/test/luni/excludes
>
> Perhaps
> -Mark
>
> In message <20...@eris.apache.org>, qiuxx@apache.org
> writes:
>>
>> Author: qiuxx
>> Date: Wed Jun 24 09:28:55 2009
>> New Revision: 787957
>>
>> URL: http://svn.apache.org/viewvc?rev=787957&view=rev
>> Log:
>> Add a top task to archive all tests into jar files independent on test task,
>> make testing archiving more convenient.
>>
>> Modified:
>> harmony/enhanced/classlib/trunk/build.xml
>> harmony/enhanced/classlib/trunk/make/build-test.xml
>> harmony/enhanced/classlib/trunk/modules/luni/build.xml
>>
>> Modified: harmony/enhanced/classlib/trunk/build.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/build.xml?r
>> ev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/build.xml (original)
>> +++ harmony/enhanced/classlib/trunk/build.xml Wed Jun 24 09:28:55 2009
>> @@ -174,6 +174,15 @@
>> <ant antfile="make/build-test.xml" inheritall="false" target="test-a
>> ll"/>
>> </target>
>>
>> + <target name="test-jar" depends="-init-hdk"
>> + description="Jar all tests">
>> + <echo>
>> +========================================
>> +Archive testing classes ...
>> +========================================
>> +</echo>
>> + <ant antfile="make/build-test.xml" inheritall="false" target="test-j
>> ar-modules"/>
>> + </target>
>>
>> <!-- =================================
>> target: doc
>>
>> Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-
>> test.xml?rev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
>> +++ harmony/enhanced/classlib/trunk/make/build-test.xml Wed Jun 24 09:28:55 2
>> 009
>> @@ -39,7 +39,7 @@
>>
>> <!-- this list of components to test will grow to eventually be all modu
>> les -->
>> <target name="test-all"
>> - depends="clean-test-output, test-modules, process-test-output" /
>> >
>> + depends="clean-test-output, test-jar-init, test-modules, process
>> -test-output" />
>>
>> <target name="process-test-output"
>> depends="process-empty, gen-report, check-test-result" />
>> @@ -56,9 +56,16 @@
>> </target>
>>
>> <target name="test-modules" depends="support-jar, test-jre-vm-info">
>> + <poll-modules target="-test-module" />
>> + </target>
>> +
>> + <target name="test-jar-init">
>> <copy file="${basedir}/make/test.properties" tofile="${hy.hdk}/build
>> /test/test.properties"/>
>> <copy file="${basedir}/make/run-test.xml" tofile="${hy.hdk}/build/te
>> st/build.xml"/>
>> - <poll-modules target="-test-module" />
>> + </target>
>> +
>> + <target name="test-jar-modules" depends="test-jar-init">
>> + <poll-modules target="test-jar" />
>> </target>
>>
>> <target name="gen-report" depends="full-report,short-report" />
>>
>> Modified: harmony/enhanced/classlib/trunk/modules/luni/build.xml
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/lun
>> i/build.xml?rev=787957&r1=787956&r2=787957&view=diff
>> =============================================================================
>> =
>> --- harmony/enhanced/classlib/trunk/modules/luni/build.xml (original)
>> +++ harmony/enhanced/classlib/trunk/modules/luni/build.xml Wed Jun 24 09:28:5
>> 5 2009
>> @@ -297,7 +297,7 @@
>> </jar>
>> </target>
>>
>> - <target name="test-jar" depends="svn-info">
>> + <target name="test-jar" depends="compile-tests, prepare-exclude">
>> <mkdir dir="${tests.hdk.dir}"/>
>>
>> <jar destfile="${tests.hdk.dir}/${hy.luni.packaging.jarname}_tests_a
>> pi.jar">
>>
>
>
>