Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Add support for installing latest sdk for workload testing #67606

Merged
merged 2 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
<SQLitePCLRawbundle_greenVersion>2.0.4</SQLitePCLRawbundle_greenVersion>
<MoqVersion>4.12.0</MoqVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<SdkVersionForWorkloadTesting>7.0.100-preview.3.22151.18</SdkVersionForWorkloadTesting>
<!-- Uncomment to set a fixed version, else the latest is used -->
<!--<SdkVersionForWorkloadTesting>7.0.100-preview.3.22151.18</SdkVersionForWorkloadTesting>-->
<CompilerPlatformTestingVersion>1.1.2-beta1.22122.4</CompilerPlatformTestingVersion>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20220331.1</MicrosoftPrivateIntellisenseVersion>
Expand Down
34 changes: 28 additions & 6 deletions eng/testing/workloads-testing.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
Condition="!Exists($(SdkWithNoWorkloadStampPath)) or !Exists($(SdkWithWorkloadStampPath))">

<Error Text="%24(SdkWithWorkloadForTestingPath) is not set" Condition="'$(SdkWithWorkloadForTestingPath)' == ''" />
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />

<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithWorkloadForTestingPath)" Importance="High" />
<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithWorkloadForTestingPath)"
Condition="'$(SdkVersionForWorkloadTesting)' != ''"
Importance="High" />
<Message Text="** Installing latest sdk for workload based tests into $(SdkWithWorkloadForTestingPath)"
Condition="'$(SdkVersionForWorkloadTesting)' == ''"
Importance="High" />

<RemoveDir Directories="$(SdkWithWorkloadForTestingPath)" />
<MakeDir Directories="$(SdkWithWorkloadForTestingPath)" />
Expand All @@ -28,9 +32,13 @@

<Target Name="_ProvisionSdkWithNoWorkload" Condition="!Exists($(SdkWithNoWorkloadStampPath))">
<Error Text="%24(SdkWithNoWorkloadForTestingPath) is not set" Condition="'$(SdkWithNoWorkloadForTestingPath)' == ''" />
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />

<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithNoWorkloadForTestingPath)" Importance="High" />
<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithNoWorkloadForTestingPath)"
Condition="'$(SdkVersionForWorkloadTesting)' != ''"
Importance="High" />
<Message Text="** Installing latest sdk for workload based tests into $(SdkWithNoWorkloadForTestingPath)"
Condition="'$(SdkVersionForWorkloadTesting)' == ''"
Importance="High" />

<RemoveDir Directories="$(SdkWithNoWorkloadForTestingPath)" />
<MakeDir Directories="$(SdkWithNoWorkloadForTestingPath)" />
Expand All @@ -42,17 +50,31 @@
<_DotNetInstallScriptPath>$(ArtifactsObjDir)$(_DotNetInstallScriptName)</_DotNetInstallScriptPath>
</PropertyGroup>

<PropertyGroup Condition="'$(SdkVersionForWorkloadTesting)' != ''">
<_DotNetInstallCommand Condition="!$([MSBuild]::IsOSPlatform('windows'))"
>$(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand>
<_DotNetInstallCommand Condition="$([MSBuild]::IsOSPlatform('windows'))"
>$(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Version $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand>
</PropertyGroup>

<PropertyGroup Condition="'$(SdkVersionForWorkloadTesting)' == ''">
<_DotNetInstallCommand Condition="!$([MSBuild]::IsOSPlatform('windows'))"
>$(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v latest -q daily --channel 7.0</_DotNetInstallCommand>
<_DotNetInstallCommand Condition="$([MSBuild]::IsOSPlatform('windows'))"
>$(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Quality daily -Channel 7.0</_DotNetInstallCommand>
</PropertyGroup>

<DownloadFile SourceUrl="https://dot.net/v1/$(_DotNetInstallScriptName)"
DestinationFolder="$(ArtifactsObjDir)"
Retries="3"
Condition="!Exists($(_DotNetInstallScriptPath))"/>

<Exec Condition="!$([MSBuild]::IsOSPlatform('windows'))"
IgnoreStandardErrorWarningFormat="true"
Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v $(SdkVersionForWorkloadTesting)" />
Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallCommand)" />

<Exec Condition="$([MSBuild]::IsOSPlatform('windows'))"
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "&amp; $(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Version $(SdkVersionForWorkloadTesting)"' />
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "&amp; $(_DotNetInstallCommand)"' />

<WriteLinesToFile File="$(SdkWithNoWorkloadStampPath)" Lines="" Overwrite="true" />
</Target>
Expand Down