-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
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:
Lines 336 to 337 in c643fed
| <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:
runtime/src/tests/Common/helixpublishwitharcade.proj
Lines 68 to 75 in c643fed
| <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:
Line 338 in c643fed
| <XUnitLogCheckerLibrariesOutDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'XUnitLogChecker'))</XUnitLogCheckerLibrariesOutDir> |
C) The build task in Libraries does this:
runtime/src/libraries/tests.proj
Line 709 in c643fed
| AdditionalProperties="%(AdditionalProperties);Configuration=Release;OutDir=$(XUnitLogCheckerLibrariesOutDir)" /> |
and the collection of the built artifacts is done here:
| XUnitLogChecker/** |
While coreclr restores/builds it in this file:
Line 31 in c643fed
| <RestoreProjects Include="Common\XUnitLogChecker\XUnitLogChecker.csproj" /> |
So there's also an opportunity to merge these two into a single centralized one.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status