The LASTSTEP_STATUS macro will contain the build status of the last completed step (the last step in a subroutine when returning from a subrouting). If your subroutine has multiple steps marked to ignore failure and you want to know if any of them failed to build, there are a couple ways to approach it:
1) After the Subroutine Call step, add a Run Script step that uses the VBP object model to locate the subroutine and check the BuildStatus property of each step.
2) In the vbld_StepDone script event of each step within the subroutine, check the Step.BuildStatus property and create/update a temporary macro (i.e., SUB_FAILED) if the step failed. Then after calling the subroutine, use that temporary macro value to determine if the subroutine failed.
The attached sample demonstrates both methods.
Note: This sample project requires VBP v6.
|