Skip to content

Commit f0048b0

Browse files
committed
rebase
1 parent 9068070 commit f0048b0

31 files changed

+168
-73
lines changed

eng/pipelines/common/templates/wasm-library-aot-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
3333
scenarios:
3434
- ${{ if eq(platform, 'browser_wasm') }}:
35-
- normal
35+
- WasmTestOnV8
3636
- ${{ if eq(platform, 'browser_wasm_win') }}:
3737
- WasmTestOnChrome
3838
- ${{ if or(eq(platform, 'wasi_wasm_win'), eq(platform, 'wasi_wasm')) }}:

eng/pipelines/common/templates/wasm-library-tests.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66
isWasmOnlyBuild: false
77
nameSuffix: ''
88
platforms: []
9-
scenarios: ['normal']
9+
scenarios: ['WasmTestOnV8']
1010
shouldContinueOnError: false
1111
shouldRunSmokeOnly: false
1212

@@ -65,8 +65,13 @@ jobs:
6565
value: /p:InstallChromeForTests=true
6666
${{ else }}:
6767
value: ''
68+
- name: firefoxInstallArg
69+
${{ if containsValue(parameters.scenarios, 'WasmTestOnFirefox') }}:
70+
value: /p:InstallFirefoxForTests=true
71+
${{ else }}:
72+
value: ''
6873
- name: v8InstallArg
69-
${{ if containsValue(parameters.scenarios, 'normal') }}:
74+
${{ if containsValue(parameters.scenarios, 'WasmTestOnV8') }}:
7075
value: /p:InstallV8ForTests=true
7176
${{ else }}:
7277
value: ''
@@ -75,7 +80,7 @@ jobs:
7580
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
7681
testGroup: innerloop
7782
nameSuffix: LibraryTests${{ parameters.nameSuffix }}
78-
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
83+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoEnableAssertMessages=true /p:BrowserHost=$(_hostedOs) $(_wasmRunSmokeTestsOnlyArg) $(chromeInstallArg) $(firefoxInstallArg) $(v8InstallArg) ${{ parameters.extraBuildArgs }}
7984
timeoutInMinutes: 240
8085
# if !alwaysRun, then:
8186
# if this is runtime-wasm (isWasmOnlyBuild):

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
9090
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
9191
scenarios:
92-
- normal
92+
- WasmTestOnV8
9393
- WasmTestOnChrome
9494

9595
# this only runs on the extra pipeline
@@ -183,7 +183,7 @@ jobs:
183183
shouldContinueOnError: ${{ not(parameters.isWasmOnlyBuild) }}
184184
alwaysRun: ${{ variables.isRollingBuild }}
185185
scenarios:
186-
- normal
186+
- WasmTestOnV8
187187

188188
# Hybrid Globalization tests
189189
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
@@ -197,8 +197,9 @@ jobs:
197197
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
198198
alwaysRun: true
199199
scenarios:
200-
- normal
200+
- WasmTestOnV8
201201
- WasmTestOnChrome
202+
- WasmTestOnFirefox
202203
- WasmTestOnNodeJS
203204

204205
# Hybrid Globalization AOT tests
@@ -214,7 +215,7 @@ jobs:
214215
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
215216
alwaysRun: true
216217
scenarios:
217-
- normal
218+
- WasmTestOnV8
218219
- WasmTestOnChrome
219220
- WasmTestOnNodeJS
220221

@@ -321,4 +322,4 @@ jobs:
321322
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
322323
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
323324
scenarios:
324-
- normal
325+
- WasmTestOnV8

eng/pipelines/libraries/outerloop-mono.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extends:
6565
- template: /eng/pipelines/libraries/helix.yml
6666
parameters:
6767
scenarios:
68-
- normal
68+
- WasmTestOnV8
6969
testScope: outerloop
7070
creator: dotnet-bot
7171
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

eng/pipelines/runtime.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,9 @@ extends:
823823
alwaysRun: ${{ variables.isRollingBuild }}
824824
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
825825
scenarios:
826-
- normal
826+
- WasmTestOnV8
827827
- WasmTestOnChrome
828+
- WasmTestOnFirefox
828829

829830
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
830831
parameters:
@@ -847,6 +848,7 @@ extends:
847848
shouldRunSmokeOnly: onLibrariesAndIllinkChanges
848849
scenarios:
849850
- WasmTestOnChrome
851+
- WasmTestOnFirefox
850852
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592
851853

852854
# EAT Library tests - only run on linux

eng/testing/WasiRunnerTemplate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ echo ----- end $(date) ----- exit code $_exitCode ------------------------------
9696

9797
echo "XHarness artifacts: $XHARNESS_OUT"
9898

99-
exit $_exitCode
99+
exit $_exitCode

eng/testing/WasmRunnerTemplate.cmd

+14-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ if [%XHARNESS_COMMAND%] == [] (
3030
if /I [%SCENARIO%]==[WasmTestOnChrome] (
3131
set XHARNESS_COMMAND=test-browser
3232
) else (
33-
set XHARNESS_COMMAND=test
33+
if /I [%SCENARIO%]==[WasmTestOnFirefox] (
34+
set XHARNESS_COMMAND=test-browser
35+
set "JS_ENGINE=--browser^=Firefox"
36+
set "JS_ENGINE_ARGS=--browser-arg^=-private-window"
37+
) else (
38+
set XHARNESS_COMMAND=test
39+
)
3440
)
3541
)
3642

@@ -56,11 +62,13 @@ if /I [%XHARNESS_COMMAND%] == [test] (
5662
)
5763
)
5864
) else (
59-
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
60-
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
61-
)
62-
if [%JS_ENGINE_ARGS%] == [] (
63-
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
65+
if /I [%SCENARIO%] == [WasmTestOnChrome] (
66+
if [%BROWSER_PATH%] == [] if not [%HELIX_CORRELATION_PAYLOAD%] == [] (
67+
set "BROWSER_PATH=--browser-path^=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe"
68+
)
69+
if [%JS_ENGINE_ARGS%] == [] (
70+
set "JS_ENGINE_ARGS=--browser-arg^=--js-flags^=--stack-trace-limit^=1000"
71+
)
6472
)
6573
)
6674

eng/testing/WasmRunnerTemplate.sh

+11-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ else
2626
fi
2727

2828
if [[ -z "$XHARNESS_COMMAND" ]]; then
29-
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
29+
if [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
30+
XHARNESS_COMMAND="test-browser --browser=Firefox"
31+
elif [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
3032
XHARNESS_COMMAND="test-browser"
3133
else
3234
XHARNESS_COMMAND="test"
@@ -59,8 +61,14 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
5961
fi
6062
fi
6163
else
62-
if [[ -z "$JS_ENGINE_ARGS" ]]; then
63-
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
64+
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
65+
if [[ -z "$JS_ENGINE_ARGS" ]]; then
66+
JS_ENGINE_ARGS="--browser-arg=--js-flags=--stack-trace-limit=1000"
67+
fi
68+
elif [[ "$SCENARIO" == "WasmTestOnFirefox" || "$SCENARIO" == "wasmtestonfirefox" ]]; then
69+
if [[ -z "$JS_ENGINE_ARGS" ]]; then
70+
JS_ENGINE_ARGS="--browser-arg=-private-window"
71+
fi
6472
fi
6573
fi
6674

src/libraries/Common/tests/System/Net/Configuration.Http.cs

+20-5
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,19 @@ public static partial class Http
5858
public static readonly Uri RemoteEchoServer = new Uri("http://" + Host + "/" + EchoHandler);
5959
public static readonly Uri SecureRemoteEchoServer = new Uri("https://" + SecureHost + "/" + EchoHandler);
6060
public static readonly Uri Http2RemoteEchoServer = new Uri("https://" + Http2Host + "/" + EchoHandler);
61-
public static readonly Uri[] EchoServerList = new Uri[] { RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer };
61+
public static Uri[] GetEchoServerList()
62+
{
63+
if (PlatformDetection.IsFirefox)
64+
{
65+
// https://github.com/dotnet/runtime/issues/101115
66+
return [RemoteEchoServer];
67+
}
68+
return [RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer];
69+
}
6270

6371
public static readonly Uri RemoteVerifyUploadServer = new Uri("http://" + Host + "/" + VerifyUploadHandler);
6472
public static readonly Uri SecureRemoteVerifyUploadServer = new Uri("https://" + SecureHost + "/" + VerifyUploadHandler);
6573
public static readonly Uri Http2RemoteVerifyUploadServer = new Uri("https://" + Http2Host + "/" + VerifyUploadHandler);
66-
public static readonly Uri[] VerifyUploadServerList = new Uri[] { RemoteVerifyUploadServer, SecureRemoteVerifyUploadServer, Http2RemoteVerifyUploadServer };
6774

6875
public static readonly Uri RemoteEmptyContentServer = new Uri("http://" + Host + "/" + EmptyContentHandler);
6976
public static readonly Uri RemoteDeflateServer = new Uri("http://" + Host + "/" + DeflateHandler);
@@ -72,7 +79,7 @@ public static partial class Http
7279
public static readonly Uri Http2RemoteGZipServer = new Uri("https://" + Http2Host + "/" + GZipHandler);
7380
public static Uri RemoteLoopServer => new Uri("ws://" + RemoteLoopHost + "/" + RemoteLoopHandler);
7481

75-
public static readonly object[][] EchoServers = EchoServerList.Select(x => new object[] { x }).ToArray();
82+
public static readonly object[][] EchoServers = GetEchoServerList().Select(x => new object[] { x }).ToArray();
7683
public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer }, new object[] { Http2RemoteVerifyUploadServer } };
7784
public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer }, new object[] { Http2RemoteDeflateServer }, new object[] { Http2RemoteGZipServer } };
7885

@@ -83,9 +90,17 @@ public static partial class Http
8390
public static readonly RemoteServer RemoteSecureHttp11Server = new RemoteServer(new Uri("https://" + SecureHost + "/"), HttpVersion.Version11);
8491
public static readonly RemoteServer RemoteHttp2Server = new RemoteServer(new Uri("https://" + Http2Host + "/"), new Version(2, 0));
8592

86-
public static readonly IEnumerable<RemoteServer> RemoteServers = new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
93+
public static IEnumerable<RemoteServer> GetRemoteServers()
94+
{
95+
if (PlatformDetection.IsFirefox)
96+
{
97+
// https://github.com/dotnet/runtime/issues/101115
98+
return new RemoteServer[] { RemoteHttp11Server };
99+
}
100+
return new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
101+
}
87102

88-
public static readonly IEnumerable<object[]> RemoteServersMemberData = RemoteServers.Select(s => new object[] { s });
103+
public static readonly IEnumerable<object[]> RemoteServersMemberData = GetRemoteServers().Select(s => new object[] { s });
89104

90105
public sealed class RemoteServer
91106
{

src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs

+29-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,35 @@ public static partial class WebSockets
2222
public static readonly Uri RemoteEchoHeadersServer = new Uri("ws://" + Host + "/" + EchoHeadersHandler);
2323
public static readonly Uri SecureRemoteEchoHeadersServer = new Uri("wss://" + SecureHost + "/" + EchoHeadersHandler);
2424

25-
public static readonly object[][] EchoServers = { new object[] { RemoteEchoServer }, new object[] { SecureRemoteEchoServer } };
26-
public static readonly object[][] EchoHeadersServers = { new object[] { RemoteEchoHeadersServer }, new object[] { SecureRemoteEchoHeadersServer } };
25+
public static object[][] GetEchoServers()
26+
{
27+
if (PlatformDetection.IsFirefox)
28+
{
29+
// https://github.com/dotnet/runtime/issues/101115
30+
return new object[][] {
31+
new object[] { RemoteEchoServer },
32+
};
33+
}
34+
return new object[][] {
35+
new object[] { RemoteEchoServer },
36+
new object[] { SecureRemoteEchoServer },
37+
};
38+
}
39+
40+
public static object[][] GetEchoHeadersServers()
41+
{
42+
if (PlatformDetection.IsFirefox)
43+
{
44+
// https://github.com/dotnet/runtime/issues/101115
45+
return new object[][] {
46+
new object[] { RemoteEchoHeadersServer },
47+
};
48+
}
49+
return new object[][] {
50+
new object[] { RemoteEchoHeadersServer },
51+
new object[] { SecureRemoteEchoHeadersServer },
52+
};
53+
}
2754
}
2855
}
2956
}

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Authentication.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ public static IEnumerable<object[]> ServerUsesWindowsAuthentication_MemberData()
546546

547547
public static IEnumerable<object[]> EchoServersData()
548548
{
549-
foreach (Uri serverUri in Configuration.Http.EchoServerList)
549+
foreach (Uri serverUri in Configuration.Http.GetEchoServerList())
550550
{
551551
yield return new object[] { serverUri };
552552
}

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs

+8-6
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static IEnumerable<object[]> GetMethods(params string[] methods)
4747
{
4848
foreach (string method in methods)
4949
{
50-
foreach (Uri serverUri in Configuration.Http.EchoServerList)
50+
foreach (Uri serverUri in Configuration.Http.GetEchoServerList())
5151
{
5252
yield return new object[] { method, serverUri };
5353
}
@@ -164,6 +164,7 @@ public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK(Configur
164164

165165
[OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))]
166166
[Theory, MemberData(nameof(RemoteServersMemberData))]
167+
[ActiveIssue("https://github.com/dotnet/runtime/issues/101115", typeof(PlatformDetection), nameof(PlatformDetection.IsFirefox))]
167168
public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer)
168169
{
169170
using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer))
@@ -275,7 +276,7 @@ public static IEnumerable<object[]> RemoteServersHeaderValuesAndUris()
275276

276277
public static IEnumerable<(Configuration.Http.RemoteServer remoteServer, Uri uri)> RemoteServersAndHeaderEchoUris()
277278
{
278-
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers)
279+
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.GetRemoteServers())
279280
{
280281
yield return (remoteServer, remoteServer.EchoUri);
281282
yield return (remoteServer, remoteServer.RedirectUriForDestinationUri(
@@ -464,7 +465,7 @@ public static IEnumerable<object[]> VerifyUploadServersStreamsAndExpectedData
464465
{
465466
get
466467
{
467-
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers) // target server
468+
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.GetRemoteServers()) // target server
468469
foreach (bool syncCopy in BoolValues) // force the content copy to happen via Read/Write or ReadAsync/WriteAsync
469470
{
470471
byte[] data = new byte[1234];
@@ -868,7 +869,7 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_
868869

869870
public static IEnumerable<object[]> SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success_MemberData()
870871
{
871-
foreach (var server in Configuration.Http.RemoteServers)
872+
foreach (var server in Configuration.Http.GetRemoteServers())
872873
{
873874
yield return new object[] { server, "12345678910", 0 };
874875
yield return new object[] { server, "12345678910", 5 };
@@ -909,7 +910,7 @@ public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Succes
909910

910911
public static IEnumerable<object[]> RemoteServersAndRedirectStatusCodes()
911912
{
912-
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers)
913+
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.GetRemoteServers())
913914
{
914915
yield return new object[] { remoteServer, 300 };
915916
yield return new object[] { remoteServer, 301 };
@@ -1228,7 +1229,7 @@ public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(Configuration.
12281229

12291230
public static IEnumerable<object[]> RemoteServersAndCompressionUris()
12301231
{
1231-
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers)
1232+
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.GetRemoteServers())
12321233
{
12331234
yield return new object[] { remoteServer, remoteServer.GZipUri };
12341235

@@ -1329,6 +1330,7 @@ public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Configuratio
13291330
[OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))]
13301331
[Theory]
13311332
[MemberData(nameof(Http2Servers))]
1333+
[ActiveIssue("https://github.com/dotnet/runtime/issues/101115", typeof(PlatformDetection), nameof(PlatformDetection.IsFirefox))]
13321334
public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(Uri server)
13331335
{
13341336
// Sync API supported only up to HTTP/1.1

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public async Task UseCallback_NotSecureConnection_CallbackNotCalled()
116116

117117
public static IEnumerable<object[]> UseCallback_ValidCertificate_ExpectedValuesDuringCallback_Urls()
118118
{
119-
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.RemoteServers)
119+
foreach (Configuration.Http.RemoteServer remoteServer in Configuration.Http.GetRemoteServers())
120120
{
121121
if (remoteServer.IsSecure)
122122
{

0 commit comments

Comments
 (0)