Working With Eclipse
For each module within the Terracotta source tree there is an Eclipse .project file that makes it easy to import the module as an Eclipse project.
To import all of the modules as Eclipse projects, use the following procuedure:
- Choose the File > Import... menu item
- Select Existing Projects into Workspace item in the General section, and click Next
- Make sure Select root directory is selected and then click Browse...
- Choose the code/base directory from within your Terracotta source tree
- Click Finish
There should now be an Eclipse project for each module within the Terracotta source tree.
Note: If there are compile errors in the Eclipse projects, it may be because Eclipse is referencing a JRE installation instead of a JDK installation. Go to Window > Preferences > Java > Installed JREs and make sure that the JRE being used is a JDK.
Running Tests in Eclipse
You will need the TCDev Eclipse plugin to do this.
Preparing Tests with tcbuild
You can use the tcbuild tool to prepare tests so that they may be run within Eclipse. To do this, you use the check_prep target of tcbuild. The check_prep target takes to arguments: the name of a module, and the type of tests to run, either unit or system. For example, to prepare the unit tests for the dso-common module, make sure you are in the code/base directory and then execute
./tcbuild check_prep dso-common unit
You will need to follow instructions printed on the screen and add required system properties to the launch configuration.
The down side to using tcbuild to prepare the tests is that this procedure must be repeated for each combination of module and test type.