mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-11 02:13:38 +09:00
[browser] install Firefox on helix (#101171)
This commit is contained in:
parent
3e569f5696
commit
a933518134
9 changed files with 96 additions and 32 deletions
|
@ -8,5 +8,7 @@
|
|||
<win_ChromeRevision>1250580</win_ChromeRevision>
|
||||
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1250586</win_ChromeBaseSnapshotUrl>
|
||||
<win_V8Version>12.3.219</win_V8Version>
|
||||
<linux_FirefoxRevision>124.0.2</linux_FirefoxRevision>
|
||||
<linux_GeckoDriverRevision>0.34.0</linux_GeckoDriverRevision>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and
|
||||
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
|
||||
'$(Scenario)' == 'WasmTestOnBrowser'">true</InstallChromeForTests>
|
||||
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and
|
||||
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
|
||||
'$(Scenario)' == 'WasmTestOnFirefox'">true</InstallFirefoxForTests>
|
||||
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and
|
||||
('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv')) and
|
||||
($([MSBuild]::IsOSPlatform('windows')) or $([MSBuild]::IsOSPlatform('linux')))"
|
||||
|
@ -55,6 +58,9 @@
|
|||
<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
|
||||
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallChromeForTests)' == 'true'">$(ChromeBinaryPath)</_WasmBrowserPathForTests>
|
||||
|
||||
<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
|
||||
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>
|
||||
|
||||
<_WasmJSEnginePathForTests Condition="'$(V8_PATH_FOR_TESTS)' != ''">$(V8_PATH_FOR_TESTS)</_WasmJSEnginePathForTests>
|
||||
<_WasmJSEnginePathForTests Condition="'$(_WasmJSEnginePathForTests)' == '' and '$(InstallV8ForTests)' == 'true'">$(V8BinaryPath)</_WasmJSEnginePathForTests>
|
||||
</PropertyGroup>
|
||||
|
@ -108,6 +114,7 @@
|
|||
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbol-patterns wasm-symbol-patterns.txt</_XHarnessArgs>
|
||||
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbolicator WasmSymbolicator.dll,Microsoft.WebAssembly.Internal.SymbolicatorWrapperForXHarness</_XHarnessArgs>
|
||||
<_XHarnessArgs Condition="'$(_WasmBrowserPathForTests)' != ''" >$(_XHarnessArgs) "--browser-path=$(_WasmBrowserPathForTests)"</_XHarnessArgs>
|
||||
<_XHarnessArgs Condition="'$(_WasmFirefoxPathForTests)' != ''" >$(_XHarnessArgs) "--browser-path=$(_WasmFirefoxPathForTests)"</_XHarnessArgs>
|
||||
<_XHarnessArgs Condition="'$(WasmXHarnessTestsTimeout)' != ''" >$(_XHarnessArgs) "--timeout=$(WasmXHarnessTestsTimeout)"</_XHarnessArgs>
|
||||
<_XHarnessArgs Condition="'$(WasmXHarnessVerbosity)' != ''" >$(_XHarnessArgs) --verbosity=$(WasmXHarnessVerbosity)</_XHarnessArgs><!-- Trace, Debug, Information (default), Warning, Error, Critical -->
|
||||
<_XHarnessArgs Condition="'$(WasmXHarnessArgsCli)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgsCli)</_XHarnessArgs>
|
||||
|
@ -252,6 +259,7 @@
|
|||
<RunScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then npm ci; fi" />
|
||||
|
||||
<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
|
||||
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
|
||||
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="export RuntimeIdentifier=browser-wasm" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
|
||||
|
@ -259,6 +267,7 @@
|
|||
<RunScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( call npm ci )" />
|
||||
|
||||
<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
|
||||
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
|
||||
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="set RuntimeIdentifier=browser-wasm" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
|
|
@ -11,10 +11,9 @@
|
|||
|
||||
<!-- disable by default on unsupported platforms -->
|
||||
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallChromeForTests>
|
||||
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallFirefoxForTests>
|
||||
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == ''">false</InstallV8ForTests>
|
||||
|
||||
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
|
||||
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile>
|
||||
<_BrowserStampDir>$(ArtifactsBinDir)\</_BrowserStampDir>
|
||||
|
||||
<WasmProvisionAfterTarget Condition="'$(WasmProvisionAfterTarget)' == ''">Build</WasmProvisionAfterTarget>
|
||||
|
@ -23,9 +22,19 @@
|
|||
<Import Project="$(MSBuildThisFileDirectory)ChromeVersions.props" />
|
||||
|
||||
<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
|
||||
<FirefoxRevision>108.0.1</FirefoxRevision>
|
||||
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl>
|
||||
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl>
|
||||
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl>
|
||||
<FirefoxBinaryName>firefox</FirefoxBinaryName>
|
||||
<GeckoDriverBinaryName>geckodriver</GeckoDriverBinaryName>
|
||||
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
|
||||
<FirefoxDirName>firefox</FirefoxDirName>
|
||||
<GeckoDriverDirName>geckodriver</GeckoDriverDirName>
|
||||
<GeckoDriverDir>$(ArtifactsBinDir)geckodriver\</GeckoDriverDir>
|
||||
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(linux_FirefoxRevision).stamp'))</FirefoxStampFile>
|
||||
<GeckoDriverStampFile>$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(linux_GeckoDriverRevision).stamp'))</GeckoDriverStampFile>
|
||||
|
||||
<FirefoxBinaryPath>$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath>
|
||||
<GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('linux'))">
|
||||
|
@ -84,12 +93,6 @@
|
|||
<V8BinaryPath>$([MSBuild]::NormalizePath($(V8Dir), $(V8BinaryName)))</V8BinaryPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
|
||||
<FirefoxRevision>108.0.1</FirefoxRevision>
|
||||
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl>
|
||||
<FirefoxBinaryName>firefox</FirefoxBinaryName>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="DownloadAndInstallChrome"
|
||||
AfterTargets="$(WasmProvisionAfterTarget)"
|
||||
Condition="(!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'">
|
||||
|
@ -188,6 +191,9 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
|
|||
<Delete Files="@(_StampFile)" />
|
||||
<RemoveDir Directories="$(FirefoxDir)" />
|
||||
|
||||
<Message Text="** Installing firefox version $(FirefoxRevision), to: $(FirefoxDir). To disable this set the msuild property InstallFirefoxForTests=false ."
|
||||
Importance="High" />
|
||||
|
||||
<DownloadFile SourceUrl="$(FirefoxUrl)" DestinationFolder="$(FirefoxDir)" SkipUnchangedFiles="true">
|
||||
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
|
||||
</DownloadFile>
|
||||
|
@ -205,4 +211,36 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &>
|
|||
|
||||
<Touch Files="$(FirefoxStampFile)" AlwaysCreate="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="DownloadAndInstallGeckoDriver"
|
||||
AfterTargets="$(WasmProvisionAfterTarget)"
|
||||
Condition="!Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))">
|
||||
<ItemGroup>
|
||||
<_StampFile Include="$(_BrowserStampDir).install-geckodriver*.stamp" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(_StampFile)" />
|
||||
<RemoveDir Directories="$(GeckoDriverDir)" />
|
||||
|
||||
<Message Text="** Installing GeckoDriver version $(GeckoDriverRevision), to: $(GeckoDriverDir)/$(GeckoDriverDirName). To disable this set the msuild property InstallFirefoxForTests=false ."
|
||||
Importance="High" />
|
||||
|
||||
<DownloadFile SourceUrl="$(GeckoDriverUrl)" DestinationFolder="$(GeckoDriverDir)" SkipUnchangedFiles="true">
|
||||
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
|
||||
</DownloadFile>
|
||||
<Exec Command="mkdir -p $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
|
||||
<Exec Command="tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
|
||||
<Exec Command="rm -rf $(_DownloadedFile)"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<_GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error Text="Cannot find GeckoDriver at $(_GeckoDriverBinaryPath) in the downloaded copy"
|
||||
Condition="!Exists($(_GeckoDriverBinaryPath))" />
|
||||
|
||||
<Exec Command="chmod +x $(_GeckoDriverBinaryPath)"/>
|
||||
|
||||
<Touch Files="$(GeckoDriverStampFile)" AlwaysCreate="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -56,8 +56,9 @@
|
|||
<NeedsWorkload Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsWorkload>
|
||||
<NeedsEMSDK Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">true</NeedsEMSDK>
|
||||
<NeedsEMSDKNode Condition="'$(Scenario)' == 'WasmTestOnNodeJS' or '$(Scenario)' == 'BuildWasmApps'">false</NeedsEMSDKNode>
|
||||
<NeedsToRunOnBrowser Condition="'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnBrowser>
|
||||
<NeedsToRunOnV8 Condition="'$(Scenario)' == '' or '$(Scenario)' == 'normal' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnV8>
|
||||
<NeedsToRunOnChrome Condition="'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnChrome>
|
||||
<NeedsToRunOnFirefox Condition="'$(Scenario)' == 'WasmTestOnFirefox'">true</NeedsToRunOnFirefox>
|
||||
<NeedsToRunOnV8 Condition="'$(Scenario)' == 'WasmTestOnV8' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnV8>
|
||||
<NeedsBuiltNugets Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsBuiltNugets>
|
||||
|
||||
<IncludeXHarnessCli>true</IncludeXHarnessCli>
|
||||
|
@ -98,9 +99,10 @@
|
|||
<HelixPreCommand Include="export XHARNESS_DISABLE_COLORED_OUTPUT=true" />
|
||||
<HelixPreCommand Include="export XHARNESS_LOG_WITH_TIMESTAMPS=true" />
|
||||
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDriverDirName):$PATH" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName):$PATH" />
|
||||
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDriverDirName):$PATH" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName):$PATH" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(GeckoDriverDirName):$PATH" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(FirefoxDirName):$PATH" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="export V8_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/$(V8DirName)/$(V8BinaryName)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -113,9 +115,10 @@
|
|||
<HelixPreCommand Include="set XHARNESS_DISABLE_COLORED_OUTPUT=true" />
|
||||
<HelixPreCommand Include="set XHARNESS_LOG_WITH_TIMESTAMPS=true" />
|
||||
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDriverDirName)%3B%PATH%" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)%3B%PATH%" />
|
||||
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDriverDirName)%3B%PATH%" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)%3B%PATH%" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(GeckoDriverDirName)%3B%PATH%" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(FirefoxDirName)%3B%PATH%" />
|
||||
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="set V8_PATH_FOR_TESTS=%HELIX_CORRELATION_PAYLOAD%\$(V8DirName)\$(V8BinaryName)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -176,24 +179,25 @@
|
|||
<Target Name="PrepareHelixCorrelationPayload_Wasm">
|
||||
<Message Condition="'$(NeedsEMSDK)' == 'true' or '$(NeedsEMSDKNode)' == 'true'" Importance="High" Text="Using emsdk: $(EmSdkDirForHelixPayload)" />
|
||||
|
||||
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
|
||||
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
|
||||
Text="Could not find chrome at $(ChromeDir)" />
|
||||
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDriverDir))"
|
||||
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDriverDir))"
|
||||
Text="Could not find chromedriver at $(ChromeDriverDir)" />
|
||||
<Error Condition="'$(NeedsToRunOnV8)' == 'true' and !Exists($(V8BinaryPath))"
|
||||
Text="Could not find v8 at $(V8BinaryPath)" />
|
||||
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'firefox' and !Exists($(FirefoxDir))"
|
||||
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'firefox' and !Exists($(FirefoxDir))"
|
||||
Text="Could not find firefox at $(FirefoxDir)" />
|
||||
|
||||
<ItemGroup Condition="'$(NeedsToRunOnBrowser)' == 'true'">
|
||||
<HelixCorrelationPayload Condition="'$(DebuggerHost)' == 'chrome'" Include="$(ChromeDir)" />
|
||||
<HelixCorrelationPayload Condition="'$(DebuggerHost)' == 'chrome'" Include="$(ChromeDriverDir)" />
|
||||
|
||||
<HelixCorrelationPayload Condition="'$(WindowsShell)' != 'true' and '$(DebuggerHost)' == 'firefox'" Include="$(FirefoxDir)" />
|
||||
<ItemGroup Condition="'$(NeedsToRunOnChrome)' == 'true'">
|
||||
<HelixCorrelationPayload Include="$(ChromeDir)" />
|
||||
<HelixCorrelationPayload Include="$(ChromeDriverDir)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HelixCorrelationPayload Condition="'$(NeedsToRunOnV8)' == 'true'" Include="$(V8Dir)" Destination="$(V8DirName)" />
|
||||
<ItemGroup Condition="'$(NeedsToRunOnFirefox)' == 'true'">
|
||||
<HelixCorrelationPayload Include="$(FirefoxDir)" />
|
||||
<HelixCorrelationPayload Include="$(GeckoDriverDir)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(NeedsToRunOnV8)' == 'true'">
|
||||
<HelixCorrelationPayload Include="$(V8Dir)" Destination="$(V8DirName)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(NeedsEMSDK)' == 'true'">
|
||||
|
|
|
@ -24,7 +24,7 @@ internal class FirefoxProvider : WasmHostProvider
|
|||
private static readonly Lazy<string> s_browserPath = new(() =>
|
||||
{
|
||||
string artifactsBinDir = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(typeof(ChromeProvider).Assembly.Location)!, "..", "..", ".."));
|
||||
return BrowserLocator.FindFirefox(artifactsBinDir, "BROWSER_PATH_FOR_TESTS");
|
||||
return BrowserLocator.FindFirefox(artifactsBinDir, "FIREFOX_PATH_FOR_TESTS");
|
||||
});
|
||||
|
||||
public FirefoxProvider(string id, ILogger logger) : base(id, logger)
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(DebuggerHost)' == 'firefox'">
|
||||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export BROWSER_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/firefox/firefox" />
|
||||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export FIREFOX_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/firefox/firefox" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Label="Don't log to console on CI" Condition="'$(ContinuousIntegrationBuild)' == 'true'">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<Project>
|
||||
<PropertyGroup Condition="'$(Scenario)' == 'WasmDebuggerTests'">
|
||||
<NeedsToRunOnBrowser>true</NeedsToRunOnBrowser>
|
||||
<NeedsToRunOnChrome Condition="'$(DebuggerHost)' == 'chrome'">true</NeedsToRunOnChrome>
|
||||
<NeedsToRunOnFirefox Condition="'$(DebuggerHost)' == 'firefox'">true</NeedsToRunOnFirefox>
|
||||
<WorkItemPrefix>$(DebuggerHost)-</WorkItemPrefix>
|
||||
<UseDotNetCliVersionFromGlobalJson>true</UseDotNetCliVersionFromGlobalJson>
|
||||
<_DebuggerTestsWorkItemTimeout Condition="'$(Scenario)' == 'WasmDebuggerTests'">00:50:00</_DebuggerTestsWorkItemTimeout>
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace Wasm.Build.Tests
|
|||
internal static readonly string? XHarnessCliPath = Environment.GetEnvironmentVariable("XHARNESS_CLI_PATH");
|
||||
internal static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH");
|
||||
internal static readonly string? BrowserPathForTests = Environment.GetEnvironmentVariable("BROWSER_PATH_FOR_TESTS");
|
||||
internal static readonly string? FirefoxPathForTests = Environment.GetEnvironmentVariable("FIREFOX_PATH_FOR_TESTS");
|
||||
internal static readonly string? V8PathForTests = Environment.GetEnvironmentVariable("V8_PATH_FOR_TESTS");
|
||||
internal static readonly bool IsRunningOnCI = Environment.GetEnvironmentVariable("IS_RUNNING_ON_CI") is "true";
|
||||
internal static readonly bool ShowBuildOutput = IsRunningOnCI || Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is not null;
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<PropertyGroup>
|
||||
<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
|
||||
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallChromeForTests)' == 'true'">$(ChromeBinaryPath)</_WasmBrowserPathForTests>
|
||||
<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
|
||||
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>
|
||||
|
||||
<RunScriptInputName Condition="'$(OS)' == 'Windows_NT'">RunScriptTemplate.cmd</RunScriptInputName>
|
||||
<RunScriptInputName Condition="'$(OS)' != 'Windows_NT'">RunScriptTemplate.sh</RunScriptInputName>
|
||||
|
@ -57,6 +59,10 @@
|
|||
<SetScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''">
|
||||
<SetScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
|
||||
<SetScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TestUsingWorkloads)' == 'true'">
|
||||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />
|
||||
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set WORKLOAD_PACKS_VER=$(PackageVersionForWorkloadManifests)" />
|
||||
|
@ -70,6 +76,9 @@
|
|||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export BROWSER_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName)/$(ChromeBinaryName)" />
|
||||
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set BROWSER_PATH_FOR_TESTS=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)\$(ChromeBinaryName)" />
|
||||
|
||||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export FIREFOX_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/$(FirefoxDirName)/$(FirefoxBinaryName)" />
|
||||
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set FIREFOX_PATH_FOR_TESTS=%HELIX_CORRELATION_PAYLOAD%\$(FirefoxDirName)\$(FirefoxBinaryName)" />
|
||||
|
||||
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export IS_RUNNING_ON_CI=true" />
|
||||
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set IS_RUNNING_ON_CI=true" />
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue