Skip to content

Issue18-TraceWildcard test fails the strict Issues run on an expected error message #262

Open

Description

Summary

The TeamCity cell Windows X64 + .NET Framework 4.8 + VS 17.0 : Issues fails on develop/2024.0 even though every issue test passes. The cell's make target is NetFxTestIssuesFromArtifacts, which runs make -C Tests\Core IssuesStrict.

Evidence

  • Build 343446 (topic/2024.0/26-09-18-unmodified-license, the current head of develop/2024.0): 107 tests passed, 17 ignored, step exit code 2.
  • Build 343499 (topic/2024.0/150-123-253-hosting-and-redirects): same result.

In both builds, the only errors are these two lines, one for each target framework of the test (net472 and net6.0):

Tests\Core\Issues\RunTests.proj(42): error: Cannot parse the argument {/T:INVALID-CATEGORY} at position {17} from command line. [...\Issue18-TraceWildcard\TestApp\TestApp.csproj::TargetFramework=net472]
Tests\Core\Issues\RunTests.proj(42): error: Cannot parse the argument {/T:INVALID-CATEGORY} at position {15} from command line. [...]

They are followed by make[1]: *** [IssuesStrict] Error 1.

Cause

Tests/Core/Issues/Issue18-TraceWildcard/Test.proj, target TestInvalidCategory, runs a build that is expected to fail with exactly this message. The target was added with #18. Its Exec task sets IgnoreExitCode="True" and captures ConsoleOutput, but it does not set IgnoreStandardErrorWarningFormat="True". The Exec task therefore logs the error: line of the child build as an MSBuild error. In strict mode, the run fails on that error.

Proposed fix

Add IgnoreStandardErrorWarningFormat="True" to that Exec element. Keep the existing Error conditions on the captured output. They are the actual assertions of the test, so a missing message is still detected.

This change affects tests only and must not appear in the release notes.

-- Claude for Gael Fraiteur

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions