Compiler Integration

TRex does not provide its own TTCN-3 compiler or runtime environment. Therefore, you cannot compile and run any TTCN-3 test suites or test cases with TRex alone. However, there is a compiler integration interface in TRex that allows to extend TRex with compiler plugins. At the moment, there are two compiler plugins available for

  • OpenTTCN,
  • Danet TTCN-3 Toolbox (Windows only!).

The OpenTTCN compiler plugin is developed directly by OpenTTCN Ltd. while the Danet plugin is developed at the University of Göttingen. We will provide a brief manual how to use these plugins. Disclaimer: the compiler integration is not used very much and may not always behave as expected.

In general, the first thing to do is to configure which compiler plugin to use. To do this, enter the compiler settings using Window->Preferences->TRex TTCN-3->Compiler Integration.

compiler-settings.jpg

Select the compiler you want to use and possibly enable the verbose console output if you want to see details of the command-line compiler call. Next, select the subpage of the "Compiler Integration" entry that fits the compiler you have selected and configure paths to your compiler etc.

In the next step, you need to configure your project for the compiler. To do this, select a TRex project in the package explorer, right-click and select properties. Here you will find an entry "TRex Settings" with subentries "Builder settings" as well as possible entries that are provided by the compiler plugins. The Danet and OpenTTCN plugins provide the entries "Compiler Project Settings" and "Compiler settings". In the builder settings, you need to decide whether you want to enable the compiler integration. In the project settings, you can configure profiles and provide information about the output executable and the dependant files.

compiler-project-settings.jpg

Analogously, configure what is necessary in the compiler settings page. Finally, there are three more things to know when using the compiler plugin. First, the plugin may provide an additional compiler mode menu in the main menu. Options offered here depend on the compiler and its settings.

compiler-mode.jpg

Second, files in a TRex project can be marked as main file / main modules. You can select such a main module by right-clicking a TTCN-3 file in the package explorer and selecting "Toggle compile file".

toggle-compile-file.jpg

Afterwards, the file icon changes to an icon displaying a "C". This file is now marked as main module.

main-module.jpg

Finally, you may disable entire subfolders to exclude them from the compilation. You do this by selecting a folder in the package explorer, right-click to open the context menu and select "Enable/Disable folder".

enable-disable-folder.jpg

This is all general information that you need to know about the compiler integration and the different places where compiler configuration takes place. To actually start a build with an external compiler, the standard build mechanism of Eclipse is used, i.e., the build is probably started when any file is changed. We strongly suggest to disable automatic building by deselecting "Build Automatically" in the project main menu. You can then invoke a build using CTRL-B or project->build project whenever you want to.

project-menu.jpg