Run the LocalTests in CI (#15770)

It was very bad. We had to disable 14 failing tests.
This commit is contained in:
Dustin L. Howett 2025-12-03 16:22:50 -06:00 committed by GitHub
parent 20998f7628
commit a719970913
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 94 additions and 0 deletions

View File

@ -87,6 +87,13 @@ stages:
buildConfigurations: [Release]
buildEverything: true
keepAllExpensiveBuildOutputs: false
${{ if eq(parameters.runTests, true) }}:
# Copy the appx files into the bin drop because the LocalTests need them
afterBuildSteps:
- pwsh: |-
$deps = ./build/scripts/Get-DependenciesFromAppxRecipe.ps1 -Path "$(Terminal.BinDir)/TestHostApp/TestHostApp.build.appxrecipe"
$dir = New-Item -Type Directory "$(Terminal.BinDir)/_testDeps"
$deps | Copy-Item -Destination $dir -Verbose
- ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }}

View File

@ -71,6 +71,9 @@ parameters:
- name: enableCaching
type: boolean
default: false
- name: afterBuildSteps
type: stepList
default: []
jobs:
- job: ${{ parameters.jobName }}
@ -210,6 +213,8 @@ jobs:
contents: $(Build.SourcesDirectory)/MSBuildCacheLogs/**
TargetFolder: $(Terminal.BinDir)/MSBuildCacheLogs
- ${{ parameters.afterBuildSteps }}
# This saves ~2GiB per architecture. We won't need these later.
# Removes:
# - All .lib that do not have an associated .exp (which would indicate that they are import libs)

View File

@ -58,6 +58,24 @@ jobs:
filePath: build\scripts\Run-Tests.ps1
arguments: -MatchPattern '*feature.test*.dll' -Platform '$(OutputBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(Terminal.BinDir)"
# Load-bearing: This needs to be Windows PowerShell, not pwsh, due to Add-AppxPackage not working in pwsh.
- powershell: |-
$deps = Get-ChildItem -Recurse "$(Terminal.BinDir)/_testDeps"
$deps | % {
Write-Host "Installing $($_.FullName)..."
Add-AppxPackage -Path $_.FullName -ErrorAction:Ignore
}
displayName: 'Install LocalTest Dependencies'
- task: PowerShell@2
displayName: 'Run Local Tests'
inputs:
pwsh: true
targetType: filePath
filePath: build\scripts\Run-Tests.ps1
arguments: -MatchPattern '*LocalTests*.dll' -Platform '$(OutputBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(Terminal.BinDir)"
condition: and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument'))
- task: PowerShell@2
displayName: 'Convert Test Logs from WTL to xUnit format'
condition: always()

View File

@ -0,0 +1,17 @@
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true,
HelpMessage="Path to the .appxrecipe to parse")]
[string]
$Path
)
$Recipe = [xml](Get-Content $Path)
$ResolvedSDKReferences = $Recipe.Project.ItemGroup.ResolvedSDKReference
$ResolvedSDKReferences |
Where-Object Architecture -eq $Recipe.Project.PropertyGroup.PackageArchitecture |
ForEach-Object {
$l = [Uri]::UnescapeDataString($_.AppxLocation)
Get-Item $l
}

View File

@ -347,6 +347,10 @@ namespace TerminalAppLocalTests
void TabTests::TryDuplicateBadTab()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
// * Create a tab with a profile with GUID 1
// * Reload the settings so that GUID 1 is no longer in the list of profiles
// * Try calling _DuplicateFocusedTab on tab 1
@ -434,6 +438,10 @@ namespace TerminalAppLocalTests
void TabTests::TryDuplicateBadPane()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
// * Create a tab with a profile with GUID 1
// * Reload the settings so that GUID 1 is no longer in the list of profiles
// * Try calling _SplitPane(Duplicate) on tab 1
@ -685,6 +693,7 @@ namespace TerminalAppLocalTests
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
@ -724,6 +733,10 @@ namespace TerminalAppLocalTests
void TabTests::MoveFocusFromZoomedPane()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
Log::Comment(L"Create a second pane");
@ -769,6 +782,10 @@ namespace TerminalAppLocalTests
void TabTests::CloseZoomedPane()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
Log::Comment(L"Create a second pane");
@ -824,6 +841,10 @@ namespace TerminalAppLocalTests
void TabTests::SwapPanes()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
Log::Comment(L"Setup 4 panes.");
@ -1030,6 +1051,10 @@ namespace TerminalAppLocalTests
void TabTests::NextMRUTab()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
// This is a test for GH#8025 - we want to make sure that we can do both
// in-order and MRU tab traversal, using the tab switcher and with the
// tab switcher disabled.
@ -1146,6 +1171,10 @@ namespace TerminalAppLocalTests
void TabTests::VerifyCommandPaletteTabSwitcherOrder()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
// This is a test for GH#8188 - we want to make sure that the order of tabs
// is preserved in the CommandPalette's TabSwitcher
@ -1241,6 +1270,7 @@ namespace TerminalAppLocalTests
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
@ -1273,6 +1303,7 @@ namespace TerminalAppLocalTests
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"IsolationLevel", L"Method")
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
auto page = _commonSetup();
@ -1305,6 +1336,10 @@ namespace TerminalAppLocalTests
void TabTests::TestPreviewCommitScheme()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
Log::Comment(L"Preview a color scheme. Make sure it's applied, then committed accordingly");
auto page = _commonSetup();
@ -1367,6 +1402,10 @@ namespace TerminalAppLocalTests
void TabTests::TestPreviewDismissScheme()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
Log::Comment(L"Preview a color scheme. Make sure it's applied, then dismissed accordingly");
auto page = _commonSetup();
@ -1415,6 +1454,10 @@ namespace TerminalAppLocalTests
void TabTests::TestPreviewSchemeWhilePreviewing()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
Log::Comment(L"Preview a color scheme, then preview another scheme. ");
Log::Comment(L"Preview a color scheme. Make sure it's applied, then committed accordingly");
@ -1482,6 +1525,10 @@ namespace TerminalAppLocalTests
void TabTests::TestClampSwitchToTab()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Ignore", L"True") // GH#19610 tracks re-enabling this test
END_TEST_METHOD_PROPERTIES()
Log::Comment(L"Test that switching to a tab index higher than the number of tabs just clamps to the last tab.");
auto page = _commonSetup();