Skip to content

Commit 72a45fb

Browse files
authored
Installing VCLibs from tests in pipeline (#5816)
* Manually copying vclibs * Removing from bypass list * Installing VCLibs on pipeline * Revert "Manually copying vclibs" This reverts commit 620e238. * Cleaning bypass list 2 * Cleaning powershell script * Revert "Cleaning powershell script" This reverts commit a94b7fd. * Fix script * Simplifying script * Adding failing tests to bypass * Addinf PushNotification and AppLifecycle tests to all platforms * Reverting push notification back to x64 only * Adding windows server image to bypass for app lifecycle
1 parent c7bdbfb commit 72a45fb

File tree

4 files changed

+78
-55
lines changed

4 files changed

+78
-55
lines changed

build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ steps:
7979
script: |
8080
$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe /quiet /install /norestart
8181
82+
- task: PowerShell@2
83+
displayName: 'Install VCLibs and VCLibs Desktop'
84+
inputs:
85+
filePath: 'build/InstallVCLibs.ps1'
86+
arguments: >
87+
-SourceDirectory "$(Build.SourcesDirectory)\BuildOutput\Release"
88+
-Platform "${{ parameters.buildPlatform }}"
89+
8290
- task: powerShell@2
8391
displayName: 'Install vc_redist'
8492
inputs:

build/InstallVCLibs.ps1

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
param(
2+
[Parameter(Mandatory = $true)]
3+
[ValidateSet("x86", "x64", "arm64")]
4+
[string]$Platform,
5+
6+
# Expecting BuildOutput\Release
7+
[Parameter(Mandatory = $true)]
8+
[string]$SourceDirectory
9+
)
10+
11+
$ErrorActionPreference = "Stop"
12+
13+
Write-Host "Installing VCLibs packages for platform: $Platform" -ForegroundColor Green
14+
Write-Host "Source directory: $SourceDirectory" -ForegroundColor Yellow
15+
16+
# Check if the source directory exists
17+
if (-not (Test-Path $SourceDirectory)) {
18+
Write-Error "Source directory not found: $SourceDirectory"
19+
exit 1
20+
}
21+
22+
# Search pattern for VCLibs packages
23+
# This pattern should get both VCLibs, VCLibs Desktop and possibly UWP desktop if present
24+
# VCLibs: Microsoft.VCLibs.{platform}.14.00.appx
25+
# VCLibs Desktop: Microsoft.VCLibs.{platform}.14.00.Desktop.appx
26+
$SearchPath = Join-Path $SourceDirectory "$Platform\AppxPackages\*\Dependencies\$Platform\Microsoft.VCLibs.$Platform.14.00*.appx"
27+
$VCLibsPackages = Get-ChildItem -Path $SearchPath -ErrorAction SilentlyContinue
28+
29+
Write-Host "Found: $($VCLibsPackages.Count) VCLibs packages" -ForegroundColor White
30+
31+
# Track installed packages to avoid duplicates
32+
# We want to install each unique package only once
33+
$InstalledPackages = @{}
34+
35+
foreach ($Package in $VCLibsPackages) {
36+
$PackageName = $Package.Name
37+
38+
if ($InstalledPackages.ContainsKey($PackageName)) {
39+
continue
40+
}
41+
42+
try {
43+
Write-Host "Installing: $PackageName" -ForegroundColor White
44+
Add-AppxPackage -Path $Package.FullName -ForceApplicationShutdown
45+
46+
$InstalledPackages[$PackageName] = $Package.FullName
47+
$TotalInstalled++
48+
Write-Host " -> Success" -ForegroundColor Green
49+
}
50+
catch {
51+
Write-Error "Failed to install $PackageName`: $($_.Exception.Message)"
52+
}
53+
}
54+
55+
Write-Host "Completed successfully!" -ForegroundColor Green

test/AppLifecycle/AppLifecycle.testdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Description": "AppLifecycle API (x86 not currently enabled)",
55
"Filename": "AppLifecycleTests.dll",
66
"Parameters": "",
7-
"Architectures": ["x64", "arm64"],
7+
"Architectures": ["x64", "x86", "arm64"],
88
"Status": "Enabled"
99
}
1010
]

test/BypassTests.json

Lines changed: 14 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,19 @@
15391539
"release_x64_Win10_rs5_DC.Test::AppLifecycle::FunctionalTests::SingleInstanceTest_PackagedWin32",
15401540
"release_x64_Win10_rs5_DC.Test::AppLifecycle::FunctionalTests::RequestRestart_Win32",
15411541
"release_x64_Win10_rs5_DC.Test::AppLifecycle::FunctionalTests::RequestRestart_PackagedWin32",
1542+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsIsNotNull",
1543+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForLaunch",
1544+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForFile_Win32",
1545+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForUnicodeNamedFile_Win32",
1546+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForFile_PackagedWin32",
1547+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForProtocol_Win32",
1548+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForProtocol_PackagedWin32",
1549+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForPush_Win32",
1550+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::GetActivatedEventArgsForStartup_Win32",
1551+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::SingleInstanceTest_Win32",
1552+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::SingleInstanceTest_PackagedWin32",
1553+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::RequestRestart_Win32",
1554+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AppLifecycle::FunctionalTests::RequestRestart_PackagedWin32",
15421555
"release_x64_Win10_rs5_DC.UnpackagedTests#metadataSet0::ChannelRequestUsingNullRemoteId",
15431556
"release_x64_Win10_rs5_DC.UnpackagedTests#metadataSet0::ChannelRequestUsingRemoteId",
15441557
"release_x64_Win10_rs5_DC.UnpackagedTests#metadataSet0::ChannelRequestCheckExpirationTime",
@@ -1645,59 +1658,6 @@
16451658
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::DynamicDependency::Test_WinRT::Create_DoNotVerifyDependencyResolution",
16461659
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::DynamicDependency::Test_WinRT::Create_Add_Architectures_Explicit",
16471660
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::DynamicDependency::Test_WinRT::Create_Add_Architectures_Current",
1648-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd",
1649-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::AuthorizationCodeWithClientAuth",
1650-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::ClientCredentialsTokenRequest",
1651-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::RefreshTokenRequest",
1652-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::ExtensionTokenRequest",
1653-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::TokenRequestErrorResponse",
1654-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::AdditionalParams",
1655-
"release_x64_Windows.10.Enterprise.LTSC.2021.OAuth2ManagerTests::OAuth2APITests::CompleteInvalidState",
16561661
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd",
1657-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::AuthorizationCodeWithClientAuth",
1658-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::ClientCredentialsTokenRequest",
1659-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::RefreshTokenRequest",
1660-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::ExtensionTokenRequest",
1661-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::TokenRequestErrorResponse",
1662-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::AdditionalParams",
1663-
"release_x64_Win10_rs5_DC.OAuth2ManagerTests::OAuth2APITests::CompleteInvalidState",
1664-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd",
1665-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::AuthorizationCodeWithClientAuth",
1666-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::ClientCredentialsTokenRequest",
1667-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::RefreshTokenRequest",
1668-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::ExtensionTokenRequest",
1669-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::TokenRequestErrorResponse",
1670-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::AdditionalParams",
1671-
"release_x86_Windows.10.Enterprise.22h2.OAuth2ManagerTests::OAuth2APITests::CompleteInvalidState",
1672-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd",
1673-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::AuthorizationCodeWithClientAuth",
1674-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::ClientCredentialsTokenRequest",
1675-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::RefreshTokenRequest",
1676-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::ExtensionTokenRequest",
1677-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::TokenRequestErrorResponse",
1678-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::AdditionalParams",
1679-
"release_x86_Windows.11.Professional.23H2.zh-CN.OAuth2ManagerTests::OAuth2APITests::CompleteInvalidState",
1680-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd",
1681-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::AuthorizationCodeWithClientAuth",
1682-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::ClientCredentialsTokenRequest",
1683-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::RefreshTokenRequest",
1684-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::ExtensionTokenRequest",
1685-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::TokenRequestErrorResponse",
1686-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::AdditionalParams",
1687-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::CompleteInvalidState",
1688-
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::AccessControl::APITests::FlatAPITest",
1689-
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::AccessControl::APITests::WinRTStringTest",
1690-
"release_x64_Windows.10.Enterprise.LTSC.2021.Test::AccessControl::APITests::WinRTBytesTest",
1691-
"release_x64_Win10_rs5_DC.Test::AccessControl::APITests::FlatAPITest",
1692-
"release_x64_Win10_rs5_DC.Test::AccessControl::APITests::WinRTStringTest",
1693-
"release_x64_Win10_rs5_DC.Test::AccessControl::APITests::WinRTBytesTest",
1694-
"release_x86_Windows.10.Enterprise.22h2.Test::AccessControl::APITests::FlatAPITest",
1695-
"release_x86_Windows.10.Enterprise.22h2.Test::AccessControl::APITests::WinRTStringTest",
1696-
"release_x86_Windows.10.Enterprise.22h2.Test::AccessControl::APITests::WinRTBytesTest",
1697-
"release_x86_Windows.11.Professional.23H2.zh-CN.Test::AccessControl::APITests::FlatAPITest",
1698-
"release_x86_Windows.11.Professional.23H2.zh-CN.Test::AccessControl::APITests::WinRTStringTest",
1699-
"release_x86_Windows.11.Professional.23H2.zh-CN.Test::AccessControl::APITests::WinRTBytesTest",
1700-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AccessControl::APITests::FlatAPITest",
1701-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AccessControl::APITests::WinRTStringTest",
1702-
"release_x86_Windows.Server.2019.DataCenter.zh-CN.Test::AccessControl::APITests::WinRTBytesTest"
1662+
"release_x86_Windows.Server.2019.DataCenter.zh-CN.OAuth2ManagerTests::OAuth2APITests::Protocol_AuthorizationCode_BasicEndToEnd"
17031663
]

0 commit comments

Comments
 (0)