2024-03-13 13:53:24 -07:00
|
|
|
<Project>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<UnifiedBuildValidationTestsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'test', 'Microsoft.DotNet.UnifiedBuild.Tests'))</UnifiedBuildValidationTestsDir>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2024-03-18 15:33:56 -07:00
|
|
|
<Target Name="RunUnifiedBuildValidation"
|
|
|
|
AfterTargets="Build">
|
2024-03-13 13:53:24 -07:00
|
|
|
<ItemGroup>
|
|
|
|
<SdkTarballItem Include="$(ArtifactsAssetsDir)dotnet-sdk*$(ArchiveExtension)" />
|
|
|
|
<SourceBuiltArtifactsItem Include="$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName).*$(ArchiveExtension)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2024-03-18 15:33:56 -07:00
|
|
|
<SdkTarballPath>%(SdkTarballItem.Identity)</SdkTarballPath>
|
2024-03-13 13:53:24 -07:00
|
|
|
<SdkBaselineValidationVerbosity Condition="'$(SdkBaselineValidationVerbosity)' == ''">normal</SdkBaselineValidationVerbosity>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2024-03-18 15:33:56 -07:00
|
|
|
<GetValidArchiveItems ArchiveItems="@(SdkTarballItem)"
|
|
|
|
ArchiveName="dotnet-sdk">
|
|
|
|
<Output TaskParameter="ValidArchiveItems"
|
|
|
|
ItemName="_BuiltSdkArchivePath"/>
|
|
|
|
</GetValidArchiveItems>
|
|
|
|
|
|
|
|
<!-- There should only be 1 SDK archive -->
|
|
|
|
<Error Text="Multiple valid dotnet-sdk archives found."
|
|
|
|
Condition="'@(_BuiltSdkArchivePath->Count())' != '1'" />
|
|
|
|
|
|
|
|
<GetClosestOfficialSdk BuiltArchivePath="@(_BuiltSdkArchivePath)" Condition="'$(BaselineMsftArchivePath)' == ''">
|
|
|
|
<Output TaskParameter="ClosestOfficialArchivePath"
|
|
|
|
PropertyName="BaselineMsftArchivePath" />
|
|
|
|
</GetClosestOfficialSdk>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<_BuiltSdkArchivePath>@(_BuiltSdkArchivePath)</_BuiltSdkArchivePath>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2024-03-13 13:53:24 -07:00
|
|
|
<!-- Multiple loggers are specified so that results are captured in trx and pipelines can fail with AzDO pipeline warnings -->
|
|
|
|
<Exec Command="$(DotnetTool) test $(UnifiedBuildValidationTestsDir) --logger:trx -c $(Configuration) -p:VSTestUseMSBuildOutput=false"
|
|
|
|
IgnoreStandardErrorWarningFormat="true"
|
|
|
|
EnvironmentVariables="
|
2024-03-18 15:33:56 -07:00
|
|
|
UNIFIED_BUILD_VALIDATION_SDK_TARBALL_PATH=$(_BuiltSdkArchivePath);
|
|
|
|
UNIFIED_BUILD_VALIDATION_MSFT_SDK_TARBALL_PATH=$(BaselineMsftArchivePath);
|
2024-03-13 13:53:24 -07:00
|
|
|
UNIFIED_BUILD_VALIDATION_SOURCEBUILT_ARTIFACTS_PATH=$(SourceBuiltArtifactsPath);
|
|
|
|
UNIFIED_BUILD_VALIDATION_TARGET_RID=$(TargetRid);
|
|
|
|
UNIFIED_BUILD_VALIDATION_PORTABLE_RID=$(PortableRid);
|
|
|
|
UNIFIED_BUILD_VALIDATION_CUSTOM_PACKAGES_PATH=$(CustomSourceBuiltPackagesPath);
|
|
|
|
UNIFIED_BUILD_VALIDATION_WARN_SDK_CONTENT_DIFFS=true;
|
|
|
|
$(CustomTestEnvVars)" />
|
2024-03-18 15:33:56 -07:00
|
|
|
|
2024-03-13 13:53:24 -07:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
</Project>
|