jnapier
01-17-2006, 12:57 PM
I am having a problem with a conditional build rule. I have set the step to only run if the %FAILSTEP_NAME% equals a certian value. But it only fires randomly on the same fail step. The step in question is is in the Failute Steps section so I only want it fired if certain steps caused the failure.
Here is the build rule
-Build only if the macro or expression
[InStr("%FAILSTEP_NAME%", "Solution") > 0 or InStr("%FAILSTEP_NAME%", "AssemblyInfo") > 0 or InStr("%FAILSTEP_NAME%","Sign Solution") > 0 or InStr("%FAILSTEP_NAME%", "Strong Name") > 0]
Is True
Here is the output that i am getting when the step is evaluated
Step 'Prepare Solution Failure' build rule evaluates false: [InStr("%FAILSTEP_NAME%", "Solution") > 0 or InStr("%FAILSTEP_NAME%", "AssemblyInfo") > 0 or InStr("%FAILSTEP_NAME%","Sign Solution") > 0 or InStr("%FAILSTEP_NAME%", "Strong Name") > 0] is true
So you can see the rule is evaluating false. the next evaluated rul actually expands the name of the step and here is the output
Step 'No VSS Label' build rule evaluates false: %FAILSTEP_NAME% (expanded value = Check Out AssemblyInfo Files from Solution) is equal to Label the Build
So you can see that the output indicate the name of the macro, so "Check Out AssemblyInfo Files from Solution" should have evaluated true in the first step. and the problem is that sometimes it actually does work. I havent pinned down the conditions of when it does work though.
What appers that is happening is that the macro is not getting expanded because successfull tests show the output with the macro expanded as opposed to %FAILSTEP_NAME%
Any help would be appreciated.
Here is the build rule
-Build only if the macro or expression
[InStr("%FAILSTEP_NAME%", "Solution") > 0 or InStr("%FAILSTEP_NAME%", "AssemblyInfo") > 0 or InStr("%FAILSTEP_NAME%","Sign Solution") > 0 or InStr("%FAILSTEP_NAME%", "Strong Name") > 0]
Is True
Here is the output that i am getting when the step is evaluated
Step 'Prepare Solution Failure' build rule evaluates false: [InStr("%FAILSTEP_NAME%", "Solution") > 0 or InStr("%FAILSTEP_NAME%", "AssemblyInfo") > 0 or InStr("%FAILSTEP_NAME%","Sign Solution") > 0 or InStr("%FAILSTEP_NAME%", "Strong Name") > 0] is true
So you can see the rule is evaluating false. the next evaluated rul actually expands the name of the step and here is the output
Step 'No VSS Label' build rule evaluates false: %FAILSTEP_NAME% (expanded value = Check Out AssemblyInfo Files from Solution) is equal to Label the Build
So you can see that the output indicate the name of the macro, so "Check Out AssemblyInfo Files from Solution" should have evaluated true in the first step. and the problem is that sometimes it actually does work. I havent pinned down the conditions of when it does work though.
What appers that is happening is that the macro is not getting expanded because successfull tests show the output with the macro expanded as opposed to %FAILSTEP_NAME%
Any help would be appreciated.