Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
radical committed Aug 17, 2023
1 parent 1cceecd commit 7346cb2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
39 changes: 19 additions & 20 deletions eng/testing/wasm-provisioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,13 @@
<ChromeOSIdentifier Condition="$([MSBuild]::IsOSPlatform('mac'))">mac</ChromeOSIdentifier>
<ChromeOSIdentifier Condition="'$(ChromeOSIdentifier)' == ''">unsupported-platform</ChromeOSIdentifier>

<!-- Download all.json to get latest chrome versions, only if the last all.json
is more than 3 days old -->
<ChromeVersionCheckThresholdDays>3</ChromeVersionCheckThresholdDays>

<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallChromeForTests>
<!-- FIXME: warn if versions are not available -->

<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile>
</PropertyGroup>

<PropertyGroup Condition="'$(ChromeOSIdentifier)' == 'linux'">
<ChromeDirName>chrome-linux</ChromeDirName>
<ChromeDriverDirName>chromedriver_linux64</ChromeDriverDirName>
<ChromeBinaryName>chrome</ChromeBinaryName>
<ChromeDriverBinaryName>chromedriver</ChromeDriverBinaryName>
<_ChromeOSPrefix>Linux_x64</_ChromeOSPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(ChromeOSIdentifier)' == 'win'">
<ChromeDirName>chrome-win</ChromeDirName>
<ChromeDriverDirName>chromedriver_win32</ChromeDriverDirName>
<ChromeBinaryName>chrome.exe</ChromeBinaryName>
<ChromeDriverBinaryName>chromedriver.exe</ChromeDriverBinaryName>
<_ChromeOSPrefix>Win_x64</_ChromeOSPrefix>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)ChromeVersions.props" />

<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
Expand All @@ -46,14 +26,27 @@
</PropertyGroup>

<PropertyGroup Condition="'$(ChromeOSIdentifier)' == 'linux'">
<ChromeDirName>chrome-linux</ChromeDirName>
<ChromeDriverDirName>chromedriver_linux64</ChromeDriverDirName>
<ChromeBinaryName>chrome</ChromeBinaryName>
<ChromeDriverBinaryName>chromedriver</ChromeDriverBinaryName>
<_ChromeOSPrefix>Linux_x64</_ChromeOSPrefix>

<ChromeVersion>$(linux_ChromeVersion)</ChromeVersion>
<ChromeRevision>$(linux_ChromeRevision)</ChromeRevision>
<_ChromeBaseSnapshotUrl>$(linux_ChromeBaseSnapshotUrl)</_ChromeBaseSnapshotUrl>

<ChromeUrl>$(linux_ChromeBaseSnapshotUrl)/chrome-linux.zip</ChromeUrl>
<ChromeDriverUrl>$(linux_ChromeBaseSnapshotUrl)/chromedriver_linux64.zip</ChromeDriverUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(ChromeOSIdentifier)' == 'win'">
<ChromeDirName>chrome-win</ChromeDirName>
<ChromeDriverDirName>chromedriver_win32</ChromeDriverDirName>
<ChromeBinaryName>chrome.exe</ChromeBinaryName>
<ChromeDriverBinaryName>chromedriver.exe</ChromeDriverBinaryName>
<_ChromeOSPrefix>Win_x64</_ChromeOSPrefix>

<ChromeVersion>$(win_ChromeVersion)</ChromeVersion>
<ChromeRevision>$(win_ChromeRevision)</ChromeRevision>
<_ChromeBaseSnapshotUrl>$(win_ChromeBaseSnapshotUrl)</_ChromeBaseSnapshotUrl>
Expand Down Expand Up @@ -84,6 +77,9 @@
AfterTargets="Build"
Condition="(!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'">

<Error Condition="'$(ChromeVersion)' == ''"
Text="No %24(ChromeVersion) set. This can be set in eng/testing/ChromeVersions.props" />

<RemoveDir Directories="$(ChromeDir)" />

<Message Text="** Installing chrome version $(ChromeVersion), rev: $(ChromeRevision). To disable this set the msuild property InstallChromeForTests=false ."
Expand All @@ -106,6 +102,9 @@
AfterTargets="Build"
Condition="(!Exists($(ChromeDriverStampFile)) or !Exists($(ChromeDriverBinaryPath))) and '$(InstallChromeForTests)' == 'true'">

<Error Condition="'$(ChromeVersion)' == ''"
Text="No %24(ChromeVersion) set. This can be set in eng/testing/ChromeVersions.props" />

<RemoveDir Directories="$(ChromeDriverDir)" />

<Message Text="** Installing chromedriver version $(ChromeVersion), rev: $(ChromeRevision). To disable this set the msuild property InstallChromeForTests=false ."
Expand Down
5 changes: 3 additions & 2 deletions src/mono/wasm/bump_chrome_version.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project DefaultTargets="UpdateChromeVersion">

<Import Project="..\Directory.Build.props" />
<UsingTask AssemblyFile="$(WasmBuildTasksAssemblyPath)"
TaskName="Microsoft.WebAssembly.Build.Tasks.GetChromeVersions" />
<UsingTask AssemblyFile="$(WasmBuildTasksAssemblyPath)" TaskName="Microsoft.WebAssembly.Build.Tasks.GetChromeVersions" />

<Target Name="UpdateChromeVersion">
<GetChromeVersions
Expand Down Expand Up @@ -48,4 +48,5 @@
</Target>

<Import Project="..\Directory.Build.targets" />

</Project>

0 comments on commit 7346cb2

Please sign in to comment.