This article explains how to set up IBM® Rational® Test RealTime Version 7.5 with Wind River Workbench Version 3.0 and demonstrates how Rational Test RealTime works with Wind River.
Install the Rational Test RealTime integration for Wind River Workbench
To install the integration, follow these steps:
- Install Rational Test RealTime 7.5.
- Install Wind River Workbench 3.0.
- Open the TDP (Target Deployment Port) Editor and save the
cwinVx86WB3.xdpfile. You can get this TDP from IBM Rational Test RealTime support. - Get and install the runtime XSD from the Eclipse EMF release 2.3.1 (
xsd-runtime-2.3.1.zip) project Web site: http://www.eclipse.org/modeling/emf/ - Launch Wind River Workbench. Select Help> Software Updates > Manage configuration > Add an extension location, and then select:
C:\Program Files\Rational\TestRealTime\eclipse_33\cdt_40\eclipse |
- Close and then restart Wind River Workbench.
To check that Rational Test RealTime is correctly integrated into the Carbide workbench, select Windows > Preferences > Test RealTime. The Test RealTime preferences should be displayed, as shown in Figure 1.
Figure 1. Rational Test RealTime preferences
If Rational Test RealTime is not visible in the preferences, check that XSD is properly installed. To do so, click Help > Software Updates > Manage Configuration, and check the content of the following directory: C:\WindRiver\workbench3-0\tools\eclipse.
Create the C project for runtime analysis
To create a simple Wind River VxWorks V6.6 RealTime process project integrated with Rational Test RealTime, follow these steps:
- Select File > New > VxWorks Real Time Process Project, as shown in Figure 2.
Figure 2. Create a project
- Type a name for the project (for example,
TestAppli), as shown in Figure 3.
Figure 3. Project name and location
- In the wizard, click Next until you reach the Build Specs page.
- On the Build Specs page, in the Active build spec list, select
SIMPENTIUMgnu_RTB, as shown in Figure 4.
Figure 4. Select available and enabled build specs
- Click Next and Finish. This creates the project in the workbench.
- Right-click the project and click Properties to check the properties of the application, as shown in Figure 5.
Figure 5. Right-click the project in Project Explorer
- Select Build Properties and ensure that
SIMPENTIUMgnu_RTPis selected as the Active build spec, as shown in Figure 6.
Figure 6. Verify the Active build spec
- To create a simple C application, right-click the project and select New > File (see Figure 7).
Figure 7. Create a C application
- Type a name (for example,
main.c), as Figure 8 shows.
Figure 8. Create a new file resource
- Create a bit of simple source code. You can copy the example in Listing 1.
Listing 1. Source code
#include <vxWorks.h>
#include <stdio.h>
#include <stdlib.h>
#include <taskLib.h>
#include <semLib.h>
#include <string.h>
#include <ioLib.h>
int main()
{
int fd;
char buffer[15];
int nBytes;
fd = open ("/TestRTReportVxWorks6.txt", O_CREAT | O_WRONLY, 0644);
printf("in the main\n");
strcpy(buffer,"The buffer\n");
nBytes=10;
if(fd){
nBytes = write (fd, buffer, nBytes);
close(fd);
printf("file closed\n");
}
else
{
printf("file not opened\n");
}
return 0;
}
|
- Save the source code.
To enable Rational Test RealTime runtime analysis on the application:
- Right-click the project and select Test RealTime > Enabled, as shown in Figure 9. This creates a Test RealTime folder in the project.
Figure 9. Enable Rational Test RealTime
- In the Test RealTime folder, open Default, and then, double-click
Default.settings (Figure 10).
Figure 10. Folder expanded in the Project Explorer
- In the settings window, select Build > Build options.
- In Target Deployment Port, select the TDP (for example,
C++ VxWorks6.6 for Gnu on Windows vxsim), as shown in Figure 11.
Figure 11. Select "Target Deployment Port"
- In Build options, select All code insertion, and then, click the ellipses (…) button, as shown in Figure 12.
Figure 12. Open Build options
- Select the runtime analysis features that you want to enable (for example, Code Coverage), as shown in Figure 13.
Figure 13. List of options
- Click OK, and then save and close the settings.
Update the instrumentation command for Rational Test RealTime
- In the Wind River workbench, click Project > Properties > Build Properties > Build Tools.
- For each build tool, except the Assembler, add
TestRTcc(with a space before and after) to the Command line after the semicolon (;).
For C-Compiler, the Command field should look like the screen capture in Figure 14, where the Command code includes TestRTcc %, so that this line reads:
echo "building $@'; TestRTcc % :compilerprefix% |
Figure 14. Edited Code
For Linker, that line in the Command should look like what Figure 15 shows: echo "building $@'; TestRTcc %: cpplinkerprefix%
Figure 15. Amend the command code
- To build the project with Rational Test RealTime enabled, select Project > Clean (Figure 16). This performs the instrumented compilation with Rational Test RealTime.
Figure 16. Clean the project
- To run the application, right-click the application and select Run RTP on target (Figure 17).
Figure 17. Run the application
After execution, the Rational Test RealTime result files are generated in Wind River (this is defined in the TDP basic setting: ATL_TRACES_FILE)
- In the Run window, click the Main tab, and in Connection to use, select
vxsim0, as shown in Figure 18.
Figure 18. Create, manage, and run configurations
- Open the
TestRealTimefolder and refresh the view (F5) to see the result file,result.xtp, as shown in Figure 19.
Figure 19. View the result file
- To see the results, right-click the
results.xtpfile and click Open with > TestRealTime Results, as shown in Figure 20.
Figure 20. View the results
This opens the Rational Test RealTime report view shown in Figure 21.
Figure 21. Report view
To learn more about IBM Rational Test RealTime and other Rational testing software, see the citations in Resources.
Learn
- Find out more about IBM Rational Test RealTime for articles on the concepts behind effective software development.
- Explore the IBM Software Testing and Quality Management Solutions information center.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
- Subscribe to the Rational Edge newsletter for articles on the concepts behind effective software development.
- Subscribe to the IBM developerWorks newsletter, a weekly update on the best of developerWorks tutorials, articles, downloads, community activities, webcasts and events.
- Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
- Download IBM Rational Test RealTime V7.5, a cross-platform automated testing solution for systems developers who are creating complex systems for embedded, real-time, and other cross-platform, distributed applications.
- Download trial versions of IBM Rational software.
- Download these IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Tivoli®, and WebSphere®.
Discuss
- Check out developerWorks blogs and get involved in the developerWorks community.




