Skip to content

XUnitLogChecker: Consolidate duplicated properties in coreclr and libraries into one place #94802

Open

Description

@carlossanlop

There are various property values that could be placed in a central location and only defined once. For example:

A) This property that determines if XUnitLogChecker is supported, is already in a central location:

<IsXUnitLogCheckerSupported Condition="'$(IsXUnitLogCheckerSupported)' == ''">false</IsXUnitLogCheckerSupported>
<IsXUnitLogCheckerSupported Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(TestNativeAot)' != 'true' and '$(TestRunNamePrefixSuffix)' != 'NativeAOT_Release' and '$(TargetOS)' != 'browser' and '$(TargetOS)' != 'wasi' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator' and '$(TargetOS)' != 'tvos' and '$(TargetOS)' != 'tvossimulator' and '$(TargetOS)' != 'maccatalyst' and '$(TargetOS)' != 'android'">true</IsXUnitLogCheckerSupported>

It is a very similar condition to the one used in the coreclr specific code:

<HelixCorrelationPayload Include="$(XUnitLogCheckerDirectory)" Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsiOSSimulator)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetstvOSSimulator)' != 'true'" />

B) The coreclr paths:

<CoreRootDirectory>$(TestBinDir)Tests\Core_Root\</CoreRootDirectory>
<CoreRootDirectory>$([MSBuild]::NormalizeDirectory($(CoreRootDirectory)))</CoreRootDirectory>
<XUnitLogCheckerDirectory>$(TestBinDir)Common\XUnitLogChecker\</XUnitLogCheckerDirectory>
<XUnitLogCheckerDirectory>$([MSBuild]::NormalizeDirectory($(XUnitLogCheckerDirectory)))</XUnitLogCheckerDirectory>
<LegacyPayloadsRootDirectory>$(TestBinDir)LegacyPayloads\</LegacyPayloadsRootDirectory>
<LegacyPayloadsRootDirectory>$([MSBuild]::NormalizeDirectory($(LegacyPayloadsRootDirectory)))</LegacyPayloadsRootDirectory>
<MergedPayloadsRootDirectory>$(TestBinDir)MergedPayloads\</MergedPayloadsRootDirectory>
<MergedPayloadsRootDirectory>$([MSBuild]::NormalizeDirectory($(MergedPayloadsRootDirectory)))</MergedPayloadsRootDirectory>

Could also be merged into the same paths used by libraries:

<XUnitLogCheckerLibrariesOutDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'XUnitLogChecker'))</XUnitLogCheckerLibrariesOutDir>

C) The build task in Libraries does this:

AdditionalProperties="%(AdditionalProperties);Configuration=Release;OutDir=$(XUnitLogCheckerLibrariesOutDir)" />

and the collection of the built artifacts is done here:

While coreclr restores/builds it in this file:

<RestoreProjects Include="Common\XUnitLogChecker\XUnitLogChecker.csproj" />

So there's also an opportunity to merge these two into a single centralized one.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Nov 15, 2023
  2. added this to the 9.0.0 milestone on Jan 17, 2024
  3. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 17, 2024
  4. lewing commented on Feb 9, 2024

    @lewing
    Member
  5. modified the milestones: 9.0.0, 10.0.0 on Aug 22, 2024
  6. modified the milestones: 10.0.0, Future on Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions