Skip to content

Commit a933518

Browse files
authored
[browser] install Firefox on helix (#101171)
1 parent 3e569f5 commit a933518

File tree

9 files changed

+96
-32
lines changed

9 files changed

+96
-32
lines changed

eng/testing/ChromeVersions.props

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
<win_ChromeRevision>1250580</win_ChromeRevision>
99
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1250586</win_ChromeBaseSnapshotUrl>
1010
<win_V8Version>12.3.219</win_V8Version>
11+
<linux_FirefoxRevision>124.0.2</linux_FirefoxRevision>
12+
<linux_GeckoDriverRevision>0.34.0</linux_GeckoDriverRevision>
1113
</PropertyGroup>
1214
</Project>

eng/testing/tests.browser.targets

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and
2828
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
2929
'$(Scenario)' == 'WasmTestOnBrowser'">true</InstallChromeForTests>
30+
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and
31+
('$(ContinuousIntegrationBuild)' != 'true' or Exists('/.dockerenv')) and
32+
'$(Scenario)' == 'WasmTestOnFirefox'">true</InstallFirefoxForTests>
3033
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == '' and
3134
('$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv')) and
3235
($([MSBuild]::IsOSPlatform('windows')) or $([MSBuild]::IsOSPlatform('linux')))"
@@ -55,6 +58,9 @@
5558
<_WasmBrowserPathForTests Condition="'$(BROWSER_PATH_FOR_TESTS)' != ''">$(BROWSER_PATH_FOR_TESTS)</_WasmBrowserPathForTests>
5659
<_WasmBrowserPathForTests Condition="'$(_WasmBrowserPathForTests)' == '' and '$(InstallChromeForTests)' == 'true'">$(ChromeBinaryPath)</_WasmBrowserPathForTests>
5760

61+
<_WasmFirefoxPathForTests Condition="'$(FIREFOX_PATH_FOR_TESTS)' != ''">$(FIREFOX_PATH_FOR_TESTS)</_WasmFirefoxPathForTests>
62+
<_WasmFirefoxPathForTests Condition="'$(_WasmFirefoxPathForTests)' == '' and '$(InstallFirefoxForTests)' == 'true'">$(FirefoxBinaryPath)</_WasmFirefoxPathForTests>
63+
5864
<_WasmJSEnginePathForTests Condition="'$(V8_PATH_FOR_TESTS)' != ''">$(V8_PATH_FOR_TESTS)</_WasmJSEnginePathForTests>
5965
<_WasmJSEnginePathForTests Condition="'$(_WasmJSEnginePathForTests)' == '' and '$(InstallV8ForTests)' == 'true'">$(V8BinaryPath)</_WasmJSEnginePathForTests>
6066
</PropertyGroup>
@@ -108,6 +114,7 @@
108114
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbol-patterns wasm-symbol-patterns.txt</_XHarnessArgs>
109115
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbolicator WasmSymbolicator.dll,Microsoft.WebAssembly.Internal.SymbolicatorWrapperForXHarness</_XHarnessArgs>
110116
<_XHarnessArgs Condition="'$(_WasmBrowserPathForTests)' != ''" >$(_XHarnessArgs) &quot;--browser-path=$(_WasmBrowserPathForTests)&quot;</_XHarnessArgs>
117+
<_XHarnessArgs Condition="'$(_WasmFirefoxPathForTests)' != ''" >$(_XHarnessArgs) &quot;--browser-path=$(_WasmFirefoxPathForTests)&quot;</_XHarnessArgs>
111118
<_XHarnessArgs Condition="'$(WasmXHarnessTestsTimeout)' != ''" >$(_XHarnessArgs) &quot;--timeout=$(WasmXHarnessTestsTimeout)&quot;</_XHarnessArgs>
112119
<_XHarnessArgs Condition="'$(WasmXHarnessVerbosity)' != ''" >$(_XHarnessArgs) --verbosity=$(WasmXHarnessVerbosity)</_XHarnessArgs><!-- Trace, Debug, Information (default), Warning, Error, Critical -->
113120
<_XHarnessArgs Condition="'$(WasmXHarnessArgsCli)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgsCli)</_XHarnessArgs>
@@ -252,13 +259,15 @@
252259
<RunScriptCommands Include="if [[ &quot;$SCENARIO&quot; == &quot;WasmTestOnNodeJS&quot; || &quot;$SCENARIO&quot; == &quot;wasmtestonnodejs&quot; ]]; then npm ci; fi" />
253260

254261
<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
262+
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="export PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
255263
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="export RuntimeIdentifier=browser-wasm" />
256264
</ItemGroup>
257265
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
258266
<SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set &quot;WasmXHarnessMonoArgs=%WasmXHarnessMonoArgs% --setenv=NPM_MODULES^=$(NodeNpmModuleString)&quot; )" />
259267
<RunScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( call npm ci )" />
260268

261269
<SetScriptCommands Condition="'$(InstallChromeForTests)' == 'true' and '$(ChromeDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(ChromeDriverBinaryPath)))" />
270+
<SetScriptCommands Condition="'$(InstallFirefoxForTests)' == 'true' and '$(GeckoDriverBinaryPath)' != ''" Include="set PREPEND_PATH=$([System.IO.Path]::GetDirectoryName($(GeckoDriverBinaryPath)))" />
262271
<SetScriptCommands Condition="'$(IsBrowserWasmProject)' == 'true'" Include="set RuntimeIdentifier=browser-wasm" />
263272
</ItemGroup>
264273
</Target>

eng/testing/wasm-provisioning.targets

+48-10
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111

1212
<!-- disable by default on unsupported platforms -->
1313
<InstallChromeForTests Condition="'$(InstallChromeForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallChromeForTests>
14+
<InstallFirefoxForTests Condition="'$(InstallFirefoxForTests)' == '' and '$(ChromeOSIdentifier)' == ''">false</InstallFirefoxForTests>
1415
<InstallV8ForTests Condition="'$(InstallV8ForTests)' == ''">false</InstallV8ForTests>
1516

16-
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
17-
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(FirefoxRevision).stamp'))</FirefoxStampFile>
1817
<_BrowserStampDir>$(ArtifactsBinDir)\</_BrowserStampDir>
1918

2019
<WasmProvisionAfterTarget Condition="'$(WasmProvisionAfterTarget)' == ''">Build</WasmProvisionAfterTarget>
@@ -23,9 +22,19 @@
2322
<Import Project="$(MSBuildThisFileDirectory)ChromeVersions.props" />
2423

2524
<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
26-
<FirefoxRevision>108.0.1</FirefoxRevision>
27-
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl>
25+
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(linux_FirefoxRevision)/linux-x86_64/en-US/firefox-$(linux_FirefoxRevision).tar.bz2</FirefoxUrl>
26+
<GeckoDriverUrl>https://github.com/mozilla/geckodriver/releases/download/v$(linux_GeckoDriverRevision)/geckodriver-v$(linux_GeckoDriverRevision)-linux64.tar.gz</GeckoDriverUrl>
2827
<FirefoxBinaryName>firefox</FirefoxBinaryName>
28+
<GeckoDriverBinaryName>geckodriver</GeckoDriverBinaryName>
29+
<FirefoxDir>$(ArtifactsBinDir)firefox\</FirefoxDir>
30+
<FirefoxDirName>firefox</FirefoxDirName>
31+
<GeckoDriverDirName>geckodriver</GeckoDriverDirName>
32+
<GeckoDriverDir>$(ArtifactsBinDir)geckodriver\</GeckoDriverDir>
33+
<FirefoxStampFile>$([MSBuild]::NormalizePath($(FirefoxDir), '.install-firefox-$(linux_FirefoxRevision).stamp'))</FirefoxStampFile>
34+
<GeckoDriverStampFile>$([MSBuild]::NormalizePath($(GeckoDriverDir), '.install-geckodriver-$(linux_GeckoDriverRevision).stamp'))</GeckoDriverStampFile>
35+
36+
<FirefoxBinaryPath>$([MSBuild]::NormalizePath($(FirefoxDir), $(FirefoxDirName), $(FirefoxBinaryName)))</FirefoxBinaryPath>
37+
<GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverDirName), $(GeckoDriverBinaryName)))</GeckoDriverBinaryPath>
2938
</PropertyGroup>
3039

3140
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('linux'))">
@@ -84,12 +93,6 @@
8493
<V8BinaryPath>$([MSBuild]::NormalizePath($(V8Dir), $(V8BinaryName)))</V8BinaryPath>
8594
</PropertyGroup>
8695

87-
<PropertyGroup Condition="'$(BrowserHost)' != 'windows'">
88-
<FirefoxRevision>108.0.1</FirefoxRevision>
89-
<FirefoxUrl>https://ftp.mozilla.org/pub/firefox/releases/$(FirefoxRevision)/linux-x86_64/en-US/firefox-$(FirefoxRevision).tar.bz2</FirefoxUrl>
90-
<FirefoxBinaryName>firefox</FirefoxBinaryName>
91-
</PropertyGroup>
92-
9396
<Target Name="DownloadAndInstallChrome"
9497
AfterTargets="$(WasmProvisionAfterTarget)"
9598
Condition="(!Exists($(ChromeStampFile)) or !Exists($(ChromeBinaryPath))) and '$(InstallChromeForTests)' == 'true'">
@@ -188,6 +191,9 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;>
188191
<Delete Files="@(_StampFile)" />
189192
<RemoveDir Directories="$(FirefoxDir)" />
190193

194+
<Message Text="** Installing firefox version $(FirefoxRevision), to: $(FirefoxDir). To disable this set the msuild property InstallFirefoxForTests=false ."
195+
Importance="High" />
196+
191197
<DownloadFile SourceUrl="$(FirefoxUrl)" DestinationFolder="$(FirefoxDir)" SkipUnchangedFiles="true">
192198
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
193199
</DownloadFile>
@@ -205,4 +211,36 @@ export __SCRIPT_DIR=%24( cd -- "%24( dirname -- "%24{BASH_SOURCE[0]}" )" &amp;>
205211

206212
<Touch Files="$(FirefoxStampFile)" AlwaysCreate="true" />
207213
</Target>
214+
215+
<Target Name="DownloadAndInstallGeckoDriver"
216+
AfterTargets="$(WasmProvisionAfterTarget)"
217+
Condition="!Exists($(GeckoDriverStampFile)) and '$(InstallFirefoxForTests)' == 'true' and !$([MSBuild]::IsOSPlatform('windows'))">
218+
<ItemGroup>
219+
<_StampFile Include="$(_BrowserStampDir).install-geckodriver*.stamp" />
220+
</ItemGroup>
221+
222+
<Delete Files="@(_StampFile)" />
223+
<RemoveDir Directories="$(GeckoDriverDir)" />
224+
225+
<Message Text="** Installing GeckoDriver version $(GeckoDriverRevision), to: $(GeckoDriverDir)/$(GeckoDriverDirName). To disable this set the msuild property InstallFirefoxForTests=false ."
226+
Importance="High" />
227+
228+
<DownloadFile SourceUrl="$(GeckoDriverUrl)" DestinationFolder="$(GeckoDriverDir)" SkipUnchangedFiles="true">
229+
<Output TaskParameter="DownloadedFile" PropertyName="_DownloadedFile" />
230+
</DownloadFile>
231+
<Exec Command="mkdir -p $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
232+
<Exec Command="tar -xf $(_DownloadedFile) -C $(GeckoDriverDir)/$(GeckoDriverDirName)"/>
233+
<Exec Command="rm -rf $(_DownloadedFile)"/>
234+
235+
<PropertyGroup>
236+
<_GeckoDriverBinaryPath>$([MSBuild]::NormalizePath($(GeckoDriverDir), $(GeckoDriverBinaryName)))</_GeckoDriverBinaryPath>
237+
</PropertyGroup>
238+
239+
<Error Text="Cannot find GeckoDriver at $(_GeckoDriverBinaryPath) in the downloaded copy"
240+
Condition="!Exists($(_GeckoDriverBinaryPath))" />
241+
242+
<Exec Command="chmod +x $(_GeckoDriverBinaryPath)"/>
243+
244+
<Touch Files="$(GeckoDriverStampFile)" AlwaysCreate="true" />
245+
</Target>
208246
</Project>

src/libraries/sendtohelix-browser.targets

+23-19
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@
5656
<NeedsWorkload Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsWorkload>
5757
<NeedsEMSDK Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true'">true</NeedsEMSDK>
5858
<NeedsEMSDKNode Condition="'$(Scenario)' == 'WasmTestOnNodeJS' or '$(Scenario)' == 'BuildWasmApps'">false</NeedsEMSDKNode>
59-
<NeedsToRunOnBrowser Condition="'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnBrowser>
60-
<NeedsToRunOnV8 Condition="'$(Scenario)' == '' or '$(Scenario)' == 'normal' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnV8>
59+
<NeedsToRunOnChrome Condition="'$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnChrome>
60+
<NeedsToRunOnFirefox Condition="'$(Scenario)' == 'WasmTestOnFirefox'">true</NeedsToRunOnFirefox>
61+
<NeedsToRunOnV8 Condition="'$(Scenario)' == 'WasmTestOnV8' or '$(Scenario)' == 'BuildWasmApps'">true</NeedsToRunOnV8>
6162
<NeedsBuiltNugets Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsBuiltNugets>
6263

6364
<IncludeXHarnessCli>true</IncludeXHarnessCli>
@@ -98,9 +99,10 @@
9899
<HelixPreCommand Include="export XHARNESS_DISABLE_COLORED_OUTPUT=true" />
99100
<HelixPreCommand Include="export XHARNESS_LOG_WITH_TIMESTAMPS=true" />
100101

101-
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDriverDirName):$PATH" />
102-
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName):$PATH" />
103-
102+
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDriverDirName):$PATH" />
103+
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(ChromeDirName):$PATH" />
104+
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(GeckoDriverDirName):$PATH" />
105+
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="export PATH=$HELIX_CORRELATION_PAYLOAD/$(FirefoxDirName):$PATH" />
104106
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="export V8_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/$(V8DirName)/$(V8BinaryName)" />
105107
</ItemGroup>
106108

@@ -113,9 +115,10 @@
113115
<HelixPreCommand Include="set XHARNESS_DISABLE_COLORED_OUTPUT=true" />
114116
<HelixPreCommand Include="set XHARNESS_LOG_WITH_TIMESTAMPS=true" />
115117

116-
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDriverDirName)%3B%PATH%" />
117-
<HelixPreCommand Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)%3B%PATH%" />
118-
118+
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDriverDirName)%3B%PATH%" />
119+
<HelixPreCommand Condition="'$(NeedsToRunOnChrome)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(ChromeDirName)%3B%PATH%" />
120+
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(GeckoDriverDirName)%3B%PATH%" />
121+
<HelixPreCommand Condition="'$(NeedsToRunOnFirefox)' == 'true'" Include="set PATH=%HELIX_CORRELATION_PAYLOAD%\$(FirefoxDirName)%3B%PATH%" />
119122
<HelixPreCommand Condition="'$(NeedsToRunOnV8)' == 'true'" Include="set V8_PATH_FOR_TESTS=%HELIX_CORRELATION_PAYLOAD%\$(V8DirName)\$(V8BinaryName)" />
120123
</ItemGroup>
121124

@@ -176,24 +179,25 @@
176179
<Target Name="PrepareHelixCorrelationPayload_Wasm">
177180
<Message Condition="'$(NeedsEMSDK)' == 'true' or '$(NeedsEMSDKNode)' == 'true'" Importance="High" Text="Using emsdk: $(EmSdkDirForHelixPayload)" />
178181

179-
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
182+
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDir))"
180183
Text="Could not find chrome at $(ChromeDir)" />
181-
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDriverDir))"
184+
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'chrome' and !Exists($(ChromeDriverDir))"
182185
Text="Could not find chromedriver at $(ChromeDriverDir)" />
183186
<Error Condition="'$(NeedsToRunOnV8)' == 'true' and !Exists($(V8BinaryPath))"
184187
Text="Could not find v8 at $(V8BinaryPath)" />
185-
<Error Condition="'$(NeedsToRunOnBrowser)' == 'true' and '$(DebuggerHost)' == 'firefox' and !Exists($(FirefoxDir))"
188+
<Error Condition="'$(NeedsToRunOnChrome)' == 'true' and '$(DebuggerHost)' == 'firefox' and !Exists($(FirefoxDir))"
186189
Text="Could not find firefox at $(FirefoxDir)" />
187190

188-
<ItemGroup Condition="'$(NeedsToRunOnBrowser)' == 'true'">
189-
<HelixCorrelationPayload Condition="'$(DebuggerHost)' == 'chrome'" Include="$(ChromeDir)" />
190-
<HelixCorrelationPayload Condition="'$(DebuggerHost)' == 'chrome'" Include="$(ChromeDriverDir)" />
191-
192-
<HelixCorrelationPayload Condition="'$(WindowsShell)' != 'true' and '$(DebuggerHost)' == 'firefox'" Include="$(FirefoxDir)" />
191+
<ItemGroup Condition="'$(NeedsToRunOnChrome)' == 'true'">
192+
<HelixCorrelationPayload Include="$(ChromeDir)" />
193+
<HelixCorrelationPayload Include="$(ChromeDriverDir)" />
193194
</ItemGroup>
194-
195-
<ItemGroup>
196-
<HelixCorrelationPayload Condition="'$(NeedsToRunOnV8)' == 'true'" Include="$(V8Dir)" Destination="$(V8DirName)" />
195+
<ItemGroup Condition="'$(NeedsToRunOnFirefox)' == 'true'">
196+
<HelixCorrelationPayload Include="$(FirefoxDir)" />
197+
<HelixCorrelationPayload Include="$(GeckoDriverDir)" />
198+
</ItemGroup>
199+
<ItemGroup Condition="'$(NeedsToRunOnV8)' == 'true'">
200+
<HelixCorrelationPayload Include="$(V8Dir)" Destination="$(V8DirName)" />
197201
</ItemGroup>
198202

199203
<ItemGroup Condition="'$(NeedsEMSDK)' == 'true'">

src/mono/browser/debugger/DebuggerTestSuite/FirefoxProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal class FirefoxProvider : WasmHostProvider
2424
private static readonly Lazy<string> s_browserPath = new(() =>
2525
{
2626
string artifactsBinDir = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(typeof(ChromeProvider).Assembly.Location)!, "..", "..", ".."));
27-
return BrowserLocator.FindFirefox(artifactsBinDir, "BROWSER_PATH_FOR_TESTS");
27+
return BrowserLocator.FindFirefox(artifactsBinDir, "FIREFOX_PATH_FOR_TESTS");
2828
});
2929

3030
public FirefoxProvider(string id, ILogger logger) : base(id, logger)

src/mono/browser/debugger/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</ItemGroup>
5858

5959
<ItemGroup Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(DebuggerHost)' == 'firefox'">
60-
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export BROWSER_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/firefox/firefox" />
60+
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export FIREFOX_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/firefox/firefox" />
6161
</ItemGroup>
6262

6363
<ItemGroup Label="Don't log to console on CI" Condition="'$(ContinuousIntegrationBuild)' == 'true'">

src/mono/browser/debugger/Wasm.Debugger.Tests/wasm.helix.targets

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22
<PropertyGroup Condition="'$(Scenario)' == 'WasmDebuggerTests'">
3-
<NeedsToRunOnBrowser>true</NeedsToRunOnBrowser>
3+
<NeedsToRunOnChrome Condition="'$(DebuggerHost)' == 'chrome'">true</NeedsToRunOnChrome>
4+
<NeedsToRunOnFirefox Condition="'$(DebuggerHost)' == 'firefox'">true</NeedsToRunOnFirefox>
45
<WorkItemPrefix>$(DebuggerHost)-</WorkItemPrefix>
56
<UseDotNetCliVersionFromGlobalJson>true</UseDotNetCliVersionFromGlobalJson>
67
<_DebuggerTestsWorkItemTimeout Condition="'$(Scenario)' == 'WasmDebuggerTests'">00:50:00</_DebuggerTestsWorkItemTimeout>

src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ internal static class EnvironmentVariables
1717
internal static readonly string? XHarnessCliPath = Environment.GetEnvironmentVariable("XHARNESS_CLI_PATH");
1818
internal static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH");
1919
internal static readonly string? BrowserPathForTests = Environment.GetEnvironmentVariable("BROWSER_PATH_FOR_TESTS");
20+
internal static readonly string? FirefoxPathForTests = Environment.GetEnvironmentVariable("FIREFOX_PATH_FOR_TESTS");
2021
internal static readonly string? V8PathForTests = Environment.GetEnvironmentVariable("V8_PATH_FOR_TESTS");
2122
internal static readonly bool IsRunningOnCI = Environment.GetEnvironmentVariable("IS_RUNNING_ON_CI") is "true";
2223
internal static readonly bool ShowBuildOutput = IsRunningOnCI || Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is not null;

0 commit comments

Comments
 (0)