I recently filed bug PowerShell task fails if there is any output to standard
error<http://cruisecontrolnet.org/issues/269>. I think this is a
breaking-change with previous versions of CCNet. We were on 1.6 and upgraded to
1.8.3. After the upgrade, a build which runs some PowerShell tests started
failing, even though no tests were failing. When I look at the code
(PowerShellTask.cs, bool Execute(IIntegrationResult) , line 230)), I see this
[1]:
ProcessResult newResult = new ProcessResult(
MakeBuildResult(processResult.StandardOutput, string.Empty),
MakeBuildResult(processResult.StandardError, "Error"),
processResult.ExitCode,
processResult.TimedOut,
processResult.Failed ||
!StringUtil.IsWhitespace(processResult.StandardError));
Errors in PowerShell mean only what I the user wants them to mean. For some
builds, errors are OK. For others, errors should fail the build. I think
being able to fail a build if there are errors is a good change, advantages, I
just don't like that it breaks behavior in 1.6. Anyway we can make this a
configuration option and revert back to 1.6 behavior? For example,
<failWhenErrors>true</failWhenErrors>
I know that's not the best name and am open to suggestions.
If we can decide on a name, I'm happy to code it up and contribute it back to
the project.
Sorry for the cross post. I signed up for and posted this on the ccnet-devel
list on Friday, but my message seems to have disappeared.
<:> Aaron
[1] For contrast, the Executable task doesn't behave this way (ExecutableTask,
bool Execute(IIntegrationResult), line 233):
ProcessResult newResult = new ProcessResult(
StringUtil.MakeBuildResult(processResult.StandardOutput, string.Empty,
this),
StringUtil.MakeBuildResult(processResult.StandardError, "Error", this),
processResult.ExitCode,
processResult.TimedOut,
processResult.Failed);
--
---
You received this message because you are subscribed to the Google Groups
"ccnet-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.