From a7199709137115e7867af797e1687f82992616ff Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Wed, 3 Dec 2025 16:22:50 -0600 Subject: [PATCH 1/2] Run the LocalTests in CI (#15770) It was very bad. We had to disable 14 failing tests. --- build/pipelines/ci.yml | 7 +++ .../templates-v2/job-build-project.yml | 5 ++ .../templates-v2/job-test-project.yml | 18 +++++++ .../Get-DependenciesFromAppxRecipe.ps1 | 17 +++++++ .../LocalTests_TerminalApp/TabTests.cpp | 47 +++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 build/scripts/Get-DependenciesFromAppxRecipe.ps1 diff --git a/build/pipelines/ci.yml b/build/pipelines/ci.yml index 3408846be3..7b0b25c047 100644 --- a/build/pipelines/ci.yml +++ b/build/pipelines/ci.yml @@ -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 }} diff --git a/build/pipelines/templates-v2/job-build-project.yml b/build/pipelines/templates-v2/job-build-project.yml index 7672901763..d1a6e50569 100644 --- a/build/pipelines/templates-v2/job-build-project.yml +++ b/build/pipelines/templates-v2/job-build-project.yml @@ -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) diff --git a/build/pipelines/templates-v2/job-test-project.yml b/build/pipelines/templates-v2/job-test-project.yml index 804a004bbc..c9c3f1cad3 100644 --- a/build/pipelines/templates-v2/job-test-project.yml +++ b/build/pipelines/templates-v2/job-test-project.yml @@ -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() diff --git a/build/scripts/Get-DependenciesFromAppxRecipe.ps1 b/build/scripts/Get-DependenciesFromAppxRecipe.ps1 new file mode 100644 index 0000000000..762a15c99b --- /dev/null +++ b/build/scripts/Get-DependenciesFromAppxRecipe.ps1 @@ -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 + } diff --git a/src/cascadia/LocalTests_TerminalApp/TabTests.cpp b/src/cascadia/LocalTests_TerminalApp/TabTests.cpp index 8036acd594..8272be34ed 100644 --- a/src/cascadia/LocalTests_TerminalApp/TabTests.cpp +++ b/src/cascadia/LocalTests_TerminalApp/TabTests.cpp @@ -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(); From c4668d99b73f33430a604c6054ad6cafd4d9e67e Mon Sep 17 00:00:00 2001 From: Windows Console Service Bot <14666831+consvc@users.noreply.github.com> Date: Wed, 3 Dec 2025 19:18:59 -0600 Subject: [PATCH 2/2] Localization Updates - fix ja-jp and fr-fr loc bugs - 12/04/2025 00:46:52 (#19616) Closes #17191 Closes #18795 Closes #17827 --- .../Resources/fr-FR/Resources.resw | 2 +- .../Resources/ja-JP/Resources.resw | 10 +-- .../Resources/ja-JP/Resources.resw | 10 +-- .../Resources/ja-JP/Resources.resw | 66 +++++++++---------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw b/src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw index d8db10aae5..891545b720 100644 --- a/src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw +++ b/src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw @@ -887,7 +887,7 @@ Déplacer l'onglet vers une nouvelle fenêtre - Exécuter en temps qu'administrateur (restreint) + Exécuter en tant qu'administrateur (restreint) This text is displayed on context menu for profile entries in add new tab button. diff --git a/src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw b/src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw index 91113d9eb9..f1bdc3f8b2 100644 --- a/src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw +++ b/src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw @@ -317,7 +317,7 @@ 同じ名前ですが大文字と小文字が異なる環境変数が複数見つかりました。使用される値は 1 つだけです。 - 新しいタブまたはウィンドウで生成されるオプションのコマンドと引数 + 新しいタブまたはペインで生成されるオプションのコマンドと引数 コマンド ラインを入力アクションとして保存する @@ -412,7 +412,7 @@ {Locked="\"tabTitle\""} - 新しい環境ブロックを作成するのではなく、新しいタブまたはウィンドウを作成するときに、ターミナル独自の環境変数を継承します。これは、"command" が渡されたときに既定で設定されます。 + 新しい環境ブロックを作成するのではなく、新しいタブまたはペインを作成するときに、ターミナル独自の環境変数を継承します。これは、"command" が渡されたときに既定で設定されます。 {Locked="\"command\""} @@ -429,7 +429,7 @@ ウィンドウを全画面表示モードで起動する - 指定した方向にある隣のウィンドウにフォーカスを移動する + 指定した方向にある隣のペインにフォーカスを移動する "move-focus" サブコマンドのエイリアス。 @@ -857,7 +857,7 @@ 設定ページを開きます - 現在のディレクトリのアクティブなプロファイルを使用して新しいウィンドウを開きます + 現在のディレクトリのアクティブなプロファイルを使用して新しいペインを開きます このタブの右側にあるすべてのタブを閉じます @@ -930,7 +930,7 @@ 接続の再起動 - アクティブウィンドウ接続を再起動します + アクティブ ペイン接続を再起動します 抜粋 diff --git a/src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw index b547bfa60f..867f60a541 100644 --- a/src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw +++ b/src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw @@ -371,7 +371,7 @@ 入力したテキストをセルにグループ化する方法を変更します。"Grapheme clusters" オプションは最も新しく Unicode で正しい方法ですが、UNIX では "wcswidth" は一般的な方法であり、"Windows コンソール" は Windows での動作方法をレプリケートします。この設定を変更するには、Windows ターミナルの再起動が必要です。この設定は、その中から起動されたアプリケーションにのみ適用されます。 - Grapheme クラスター + 書記素クラスター The default choice between multiple graphics APIs. @@ -1346,7 +1346,7 @@ "environment variables" are user-definable values that can affect the way running processes will behave on a computer - 有効にすると、ターミナルは、このプロファイルで新しいタブまたはウィンドウを作成するときに新しい環境ブロックを生成します。無効にすると、代わりにタブ/ペインはターミナルが開始された変数を継承します。 + 有効にすると、ターミナルは、このプロファイルで新しいタブまたはペインを作成するときに新しい環境ブロックを生成します。無効にすると、代わりにタブ/ペインはターミナルが開始された変数を継承します。 A description for what the "Reload environment variables" setting does. Presented near "Profile_ReloadEnvVars". @@ -1390,7 +1390,7 @@ An option to choose from for the "bell style" setting. When selected, notifications are silenced. - ウィンドウのアニメーションを無効にする + ペインのアニメーションを無効にする Header for a control to toggle animations on panes. "Enabled" value disables the animations. @@ -1741,7 +1741,7 @@ An error message that appears when the user attempts to rename a color scheme to something invalid. This appears as the title, and explains the issue. - マウスをポイントしたときにフォーカス ウィンドウを自動的に表示する + マウスをポイントしたときにフォーカス ペインを自動的に表示する Header for a control to toggle the "focus follow mouse" setting. When enabled, hovering over a pane puts it in focus. @@ -1753,7 +1753,7 @@ Header for a control to toggle opacity changes with scrolling. When enabled, holding the Ctrl and Shift keys while scrolling will increase or decrease the window opacity. - ウィンドウのアニメーション + ペインのアニメーション Header for a control to toggle animations on panes. "Enabled" value enables the animations. diff --git a/src/cascadia/TerminalSettingsModel/Resources/ja-JP/Resources.resw b/src/cascadia/TerminalSettingsModel/Resources/ja-JP/Resources.resw index c4ec81221a..75191689e3 100644 --- a/src/cascadia/TerminalSettingsModel/Resources/ja-JP/Resources.resw +++ b/src/cascadia/TerminalSettingsModel/Resources/ja-JP/Resources.resw @@ -124,10 +124,10 @@ 新しいタブ... - ウィンドウの分割... + ペインの分割... - スニペット ウィンドウを開く + スニペット ペインを開く This will open a pane with a list of the users's saved commands ("snippets") in it @@ -153,7 +153,7 @@ 他のすべてのタブを閉じる - ウィンドウを閉じる + ペインを閉じる インデックス {0}のタブを閉じる @@ -229,7 +229,7 @@ 以前 - ウィンドウの複製する + ペインの複製する タブを複製する @@ -262,41 +262,41 @@ {0} will be replaced with one of the four directions "DirectionLeft", "DirectionRight", "DirectionUp", "DirectionDown" - 前回使用したウィンドウにフォーカスを移動する + 前回使用したペインにフォーカスを移動する - 次のウィンドウに順番にフォーカスを移動する + 次のペインに順番にフォーカスを移動する - 前のウィンドウに順番にフォーカスを移動する + 前のペインに順番にフォーカスを移動する - 最初のウィンドウにフォーカスを移動する + 最初のペインにフォーカスを移動する - 親ウィンドウにフォーカスを移動する + 親ペインにフォーカスを移動する - 子ウィンドウにフォーカスを移動する + 子ペインにフォーカスを移動する - ウィンドウを入れ替える + ペインを入れ替える - ウィンドウを入れ替える {0} + ペインを入れ替える {0} {0} will be replaced with one of the four directions "DirectionLeft", "DirectionRight", "DirectionUp", "DirectionDown" - ウィンドウを最後に使用したウィンドウと入れ替える + ペインを最後に使用したペインと入れ替える - ウィンドウを次のウィンドウと順番に入れ替える + ペインを次のペインと順番に入れ替える - ウィンドウを前のウィンドウと順番に入れ替える + ペインを前のペインと順番に入れ替える - 最初のウィンドウとウィンドウを入れ替える + 最初のペインとペインを入れ替える 新しいタブ @@ -357,10 +357,10 @@ タブ名を変更 - ウィンドウのサイズの変更する + ペインのサイズの変更する - ウィンドウのサイズを変更する {0} + ペインのサイズを変更する {0} {0} will be replaced with one of the four directions "DirectionLeft", "DirectionRight", "DirectionUp", or "DirectionDown" @@ -427,19 +427,19 @@ {0} will be replaced with a color, displayed in hexadecimal (#RRGGBB) notation. - ウィンドウを左右に分割 + ペインを左右に分割 - ウィンドウの移動 + ペインの移動 - ウィンドウを新しいウィンドウに移動 + ペインを新しいウィンドウに移動 - ウィンドウを分割する + ペインを分割する - ウィンドウを上下に分割 + ペインを上下に分割 タブに切り替え @@ -488,19 +488,19 @@ 最大化ウィンドウを復元する - ウィンドウ分割の方向の切り替え + ペイン分割の方向の切り替え - ウィンドウのズームの切り替え + ペインのズームの切り替え - ウィンドウを読み取り専用モードに切り替える + ペインを読み取り専用モードに切り替える - ウィンドウの読み取り専用モードを有効にする + ペインの読み取り専用モードを有効にする - ウィンドウの読み取り専用モードを無効にする + ペインの読み取り専用モードを無効にする ターミナルの視覚効果の切り替え @@ -532,7 +532,7 @@ Quake is a well-known computer game and isn't related to earthquakes, etc. See https://en.wikipedia.org/wiki/Quake_(video_game) - ウィンドウ {0} をフォーカスする + ペイン {0} をフォーカスする {0} will be replaced with a user-specified number @@ -585,7 +585,7 @@ A command to change how transparent the background of the window is - 最後に閉じたウィンドウまたはタブを復元する + 最後に閉じたペインまたはタブを復元する すべてのテキストを選択 @@ -695,10 +695,10 @@ コンテキスト メニューの表示 - 他のすべてのウィンドウを閉じる + 他のすべてのペインを閉じる - ブロードキャスト入力をすべてのウィンドウに切り替える + ブロードキャスト入力をすべてのペインに切り替える When enabled, input will go to all panes in this tab simultaneously @@ -774,7 +774,7 @@ テキストを検索する - ウィンドウをフォーカスする + ペインをフォーカスする バッファのエクスポート