Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330531

Summary: [releng] No test results when test fails
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RelengAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: 1.4 M5   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2010-11-17 17:50:17 EST
When a test fails during build, no test results are being copied to the output directory and no test reports are being generated.

The reason is the attribute "haltonfailure" in the customTargets.xml files which will break the execution of the postBuild task as soon as a single test fails. Since the postBuild target is interrupted immediately, no cleanup is done and the build results are lost.

As an alternative, there is an attribute "failureproperty" that sets a property if a test fails. Problem is that properties cannot be shared between targets. We need to either merge test, publish and tidyup into one target or find a way to communicate the test status to the end of postBuild.
Comment 1 Ralf Sternberg CLA 2011-01-07 05:20:16 EST
Turned out that a property can be accessed from a *dependent* task.

Fixed by re-structuring customTargets.xml, including a finish task with a dependency to the runTests task. The finish task fails when the test.failed property has been set by the runTests task.