Skip to content

Commit 1129ebd

Browse files
authored
[0.81] Re-introduce Desktop integration tests (#16025)
* Remove Chakra and RNTester legacy code * Re-introduce Desktop integration tests (#16017) * Update packages.lock * Update filters * Install WinAppSDK runtime 1.7 instead of 1.8
1 parent f006143 commit 1129ebd

37 files changed

Lines changed: 1021 additions & 574 deletions

.ado/build-template.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,31 +299,20 @@ extends:
299299
timeoutInMinutes: 360 # CodeQL requires 3x usual build timeout
300300
variables:
301301
- template: .ado/variables/windows.yml@self
302-
# Enable if any issues RNTesterIntegrationTests::* become unstable.
302+
# Enable if any issues RNTesterHeadlessTests::* become unstable.
303303
- name: Desktop.IntegrationTests.SkipRNTester
304304
value: false
305-
#5059 - Disable failing or intermittent tests (IntegrationTestHarness,WebSocket,Logging).
306305
#10732 - WebSocketIntegrationTest::SendReceiveSsl fails on Windows Server 2022.
307306
#12714 - Disable for first deployment of test website.
308-
#14217 - Reneable RNTesterIntegrationTests
309307
- name: Desktop.IntegrationTests.Filter
310308
value: >
311-
(FullyQualifiedName!=RNTesterIntegrationTests::IntegrationTestHarness)&
312-
(FullyQualifiedName!=RNTesterIntegrationTests::WebSocket)&
313-
(FullyQualifiedName!=RNTesterIntegrationTests::WebSocketBlob)&
314-
(FullyQualifiedName!=RNTesterIntegrationTests::WebSocketMultipleSend)&
315309
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::ConnectClose)&
316310
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::ConnectNoClose)&
317311
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::SendReceiveClose)&
318312
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::SendConsecutive)&
319313
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::SendReceiveLargeMessage)&
320314
(FullyQualifiedName!=Microsoft::React::Test::WebSocketIntegrationTest::SendReceiveSsl)&
321-
(FullyQualifiedName!=Microsoft::React::Test::HttpOriginPolicyIntegrationTest)&
322-
(FullyQualifiedName!=RNTesterIntegrationTests::Dummy)&
323-
(FullyQualifiedName!=RNTesterIntegrationTests::Fetch)&
324-
(FullyQualifiedName!=RNTesterIntegrationTests::XHRSample)&
325-
(FullyQualifiedName!=RNTesterIntegrationTests::Blob)&
326-
(FullyQualifiedName!=RNTesterIntegrationTests::Logging)
315+
(FullyQualifiedName!=Microsoft::React::Test::HttpOriginPolicyIntegrationTest)
327316
#6799 - HostFunctionTest, HostObjectProtoTest crash under JSI/V8;
328317
# PreparedJavaScriptSourceTest asserts/fails under JSI/ChakraCore
329318
- name: Desktop.UnitTests.Filter

.ado/jobs/desktop-single.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,25 @@ parameters:
2121
- Continuous
2222

2323
steps:
24+
- template: ../templates/checkout-shallow.yml
25+
2426
# Set up IIS for integration tests
2527
- pwsh: |
2628
Install-WindowsFeature -Name Web-Server, Web-Scripting-Tools
2729
displayName: Install IIS
2830
2931
- pwsh: |
30-
function Invoke-WebRequestWithRetry($Uri, $OutFile, $MaxRetries = 3) {
31-
for ($i = 1; $i -le $MaxRetries; $i++) {
32-
try {
33-
Write-Host "Downloading $OutFile (attempt $i of $MaxRetries)"
34-
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
35-
return
36-
} catch {
37-
Write-Host "Attempt $i failed: $_"
38-
if ($i -eq $MaxRetries) { throw }
39-
Start-Sleep -Seconds (5 * $i)
40-
}
41-
}
42-
}
32+
$DownloadScript = "$(Build.SourcesDirectory)\vnext\Scripts\Tfs\Invoke-WebRequestWithRetry.ps1"
4333
44-
Invoke-WebRequestWithRetry `
34+
& $DownloadScript `
4535
-Uri 'https://download.visualstudio.microsoft.com/download/pr/20598243-c38f-4538-b2aa-af33bc232f80/ea9b2ca232f59a6fdc84b7a31da88464/dotnet-hosting-8.0.3-win.exe' `
4636
-OutFile dotnet-hosting-8.0.3-win.exe
4737
4838
Write-Host 'Installing .NET hosting bundle'
4939
Start-Process -Wait -FilePath .\dotnet-hosting-8.0.3-win.exe -ArgumentList '/INSTALL', '/QUIET', '/NORESTART'
5040
Write-Host 'Installed .NET hosting bundle'
5141
52-
Invoke-WebRequestWithRetry `
42+
& $DownloadScript `
5343
-Uri 'https://download.visualstudio.microsoft.com/download/pr/f2ec926e-0d98-4a8b-8c70-722ccc2ca0e5/b59941b0c60f16421679baafdb7e9338/dotnet-sdk-7.0.407-win-x64.exe' `
5444
-OutFile dotnet-sdk-7.0.407-win-x64.exe
5545
@@ -58,7 +48,17 @@ steps:
5848
Write-Host 'Installed .NET 7 SDK'
5949
displayName: Install the .NET Core Hosting Bundle
6050
61-
- template: ../templates/checkout-shallow.yml
51+
- pwsh: |
52+
$DownloadScript = "$(Build.SourcesDirectory)\vnext\Scripts\Tfs\Invoke-WebRequestWithRetry.ps1"
53+
54+
& $DownloadScript `
55+
-Uri 'https://aka.ms/windowsappsdk/1.7/latest/windowsappruntimeinstall-x64.exe' `
56+
-OutFile windowsappruntimeinstall-x64.exe
57+
58+
Write-Host 'Installing Windows App SDK Runtime'
59+
Start-Process -Wait -FilePath .\windowsappruntimeinstall-x64.exe -ArgumentList '--quiet'
60+
Write-Host 'Installed Windows App SDK Runtime'
61+
displayName: Install Windows App SDK Runtime
6262
6363
- template: ../templates/prepare-js-env.yml
6464

@@ -72,7 +72,7 @@ steps:
7272

7373
- ${{ if eq(variables['Desktop.IntegrationTests.SkipRNTester'], true) }}:
7474
- pwsh: |
75-
$newValue = '(FullyQualifiedName!~RNTesterIntegrationTests::)&' + "$(Desktop.IntegrationTests.Filter)"
75+
$newValue = '(FullyQualifiedName!~Microsoft::React::Test::RNTesterHeadlessTests::)&' + "$(Desktop.IntegrationTests.Filter)"
7676
Write-Host "##vso[task.setvariable variable=Desktop.IntegrationTests.Filter]$newValue"
7777
displayName: Update Desktop.IntegrationTests.Filter to exclude RNTester integration tests
7878

Directory.Build.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@
106106
ReactNativeDir;
107107
ReactNativeWindowsDir;
108108
FollyDir;
109+
IncludeFabricInterface;
110+
UseFabric;
109111
YogaDir;
110112
WinVer;
111113
" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Re-introduce Desktop integration tests",
4+
"packageName": "react-native-windows",
5+
"email": "julio.rocha@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
</ItemGroup>
182182
<ItemGroup>
183183
<PackageReference Include="boost" Version="1.84.0.0" />
184-
<PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" />
184+
<PackageReference Include="$(HermesPackageName)" Version="$(HermesVersion)" />
185185
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
186186
</ItemGroup>
187187
<Choose>

vnext/Desktop.IntegrationTests/ChakraRuntimeHolder.cpp

Lines changed: 0 additions & 61 deletions
This file was deleted.

vnext/Desktop.IntegrationTests/ChakraRuntimeHolder.h

Lines changed: 0 additions & 43 deletions
This file was deleted.

vnext/Desktop.IntegrationTests/DesktopTestInstance.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

vnext/Desktop.IntegrationTests/DesktopTestInstance.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

vnext/Desktop.IntegrationTests/DesktopTestRunner.cpp

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)