Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Corona HowTo: Include a New Plugin in Build"
(→Modify Build) |
(→Modify Build) |
||
Line 46: | Line 46: | ||
* modify Corona maps for Corona client and/or server tests as described earlier | * modify Corona maps for Corona client and/or server tests as described earlier | ||
* modify the appropriate test.xml file for client xor server | * modify the appropriate test.xml file for client xor server | ||
− | ** the file is located in [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/maps/ org.eclipse.corona/build/internalBuildTools/testConfigs] in subfolder 'linux-local' for client tests, or 'linux-local-server' for server tests | + | ** the file is located in [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.corona/maps/ org.eclipse.corona/build/internalBuildTools/testConfigs] in subfolder ''linux-local'' for client tests, or ''linux-local-server'' for server tests |
− | ** include target for the test (let the plugin name is 'org.eclipse.corona.tests.mytests'). | + | ** include target for the test (let the plugin name is ''org.eclipse.corona.tests.mytests''). |
<blockquote> | <blockquote> | ||
<pre> | <pre> | ||
Line 58: | Line 58: | ||
</pre> | </pre> | ||
</blockquote> | </blockquote> | ||
− | ** enable the target in already existing target named 'all' | + | ** enable the target in already existing target named ''all'' |
<blockquote> | <blockquote> | ||
<pre> | <pre> |
Revision as of 12:13, 13 March 2007
Contents
Correct Plugin Structure
A Corona plugin is a regular Equinox plugin/fragment that conforms to Europa build practices. If a new plugin is created the following should be assured:
- 4-part version numbering should be used, the first three parts are numbers, the last is "qualifier" word, for example: 0.5.0.qualifier. The "qualifier" is not used for plugins representing 3rd party.
- plugin must correctly list its required JVM versions in the manifest/plugin.xml
- build.properties file must list all files that should be included in the build result (the option bin.includes), if a jar file is included in Corona, but does not have IP approval, it should be excluded from build.properties.
For test plugins
Test plugins must be written in JUnit 3. JUnit 4 is not yet supported. The test plugin must have an ant script, which will run the test. Typically it is called test.xml and is placed in test plugin's root directory - see the script in one of plugins.
To add it to your plugin:
- Make test suits - one for tests that require UI and/or second that do not need UI.
- Test suit may be any class that have a method public static junit.framework.Test suite(). The return object is junit.framework.TestSuite with all your test classes added. To add a test class, you need to invoke addTestSuite(<TestClass>).
public static junit.framework.Test suite() { junit.framework.TestSuite suite = new junit.framework.TestSuite("An example suite"); suite.addTestSuite(SomeTest.class); return suite; }
- Copy the example ant script to your plugin as test.xml
- Modify the suite target:
- If you have UI test, uncomment the <ant target="ui-test"... and set property classname with the test suite class for UI tests.
- Do the same for non-UI tests in <ant target="core-test"...
Modify Build
The following steps should be taken to include a new plugin in build:
- add the plugin to Corona Client and/or Server feature (steps for adding to Corona client feature)
- checkout feature projects from Technology CVS org.eclipse.corona/features/
- open feature.xml in proper feature project - org.eclipse.corona.client, org.eclipse.corona.server, org.eclipse.corona.test.client or org.eclipse.test.corona.server
- open feature.xml
- on Plug-ins and fragments tab select Add and select the new plugin
- then select Versions and select Synchronization options: "Copy versions from plug-in and fragment manifests"
- save the feature.xml and commit to CVS
- modify Corona maps for Corona client and/or server
- the maps can be found in maps folder in CVS under org.eclipse.corona/maps
- add a line that represents the plugin, the line must specify plugin/fragment, name and CVS access parameters analogously to other defined entries in maps.
- If milestone version or 3rd party jars change it is necessary to modify files in the build folder (the folder is in Corona CVS)
- in customTargets.xml modify getPlugins target, set the correct argument to wget of 3rd party jars OR
- assure that download folder on the build machine contains a file named build.zip with all necessary 3rd party plugins and jars.
For Test Plugins
For test plugins, the following changes must be done in build:
- add the plugin to Corona Client and/or Server test feature as described earlier
- modify Corona maps for Corona client and/or server tests as described earlier
- modify the appropriate test.xml file for client xor server
- the file is located in org.eclipse.corona/build/internalBuildTools/testConfigs in subfolder linux-local for client tests, or linux-local-server for server tests
- include target for the test (let the plugin name is org.eclipse.corona.tests.mytests).
<target name="mytests.test" description="Runs the org.eclipse.corona.tests.mytests test.xml"> <antcall target="runtests"> <param name="testPlugin" value="org.eclipse.corona.tests.mytests_0.8.0" /> <param name="report" value="org.eclipse.corona.tests.mytests" /> </antcall> </target>
- enable the target in already existing target named all
<target name="all"> ... <antcall target="mytests.test" /> ... </target>
Check if the Automated build works
Verify if the currently configured build works correctly. The page Execution of Build Scripts describes how to run a automated build.
The page Corona_Development_Build describes steps to set up a new build environment or adjust existing one.