Skip to content

Commit 3fcc935

Browse files
zadjii-msftmsftbot[bot]
authored andcommitted
Fix unittesting our .xaml classes (#4105)
## Summary of the Pull Request New year, new unittests. This PR introduces a new project, `TestHostApp`. This project is largely taken from the TAEF samples, and allows us to easily construct a helper executable and `resources.pri` for running TerminalApp unittests. ## References ## PR Checklist * [x] Closes #3986 * [x] I work here * [x] is Tests * [n/a] Requires documentation to be updated * [x] **Waiting for an updated version of TAEF to be available** ## Detailed Description of the Pull Request / Additional comments Unittesting for the TerminalApp project has been a horrifying process to try getting everything pieced together just right. Dependencies need to get added to manifests, binplaced correctly, and XAML resources need to get compiled together as well. In addition, using a MUX `Application` (as opposed to the Windows.UI.Xaml `Application`) has led to additional problems. This was always a horrifying house of cards for us. Turns out, the reason this was so horrible is that the test infrastructure for doing what we're doing _literally didn't exist_ when I started doing all that work last year. So, with help from the TAEF team, I was able to get rid of our entire house of cards, and use a much simpler project to build and run the tests. Unfortunately, the latest TAEF release has a minor bug in it's build rules, and only publishes the x86 version of a dll we need from them. But, the rest of this PR works for x86, and I'll bump this when that updated version is available. We should be able to review this even in the state it's in. ## Validation Steps Performed ran the tests yo
1 parent dd1dbf5 commit 3fcc935

25 files changed

+412
-108
lines changed

OpenConsole.sln

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winconpty.LIB", "src\wincon
257257
EndProject
258258
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winconpty.DLL", "src\winconpty\dll\winconptydll.vcxproj", "{A22EC5F6-7851-4B88-AC52-47249D437A52}"
259259
EndProject
260+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestHostApp", "src\cascadia\LocalTests_TerminalApp\TestHostApp\TestHostApp.vcxproj", "{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}"
261+
ProjectSection(ProjectDependencies) = postProject
262+
{CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506} = {CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506}
263+
EndProjectSection
264+
EndProject
265+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BDB237B6-1D1D-400F-84CC-40A58FA59C8E}"
266+
EndProject
260267
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "til.unit.tests", "src\til\ut_til\til.unit.tests.vcxproj", "{767268EE-174A-46FE-96F0-EEE698A1BBC9}"
261268
EndProject
262269
Global
@@ -1320,6 +1327,30 @@ Global
13201327
{A22EC5F6-7851-4B88-AC52-47249D437A52}.Release|x64.Build.0 = Release|x64
13211328
{A22EC5F6-7851-4B88-AC52-47249D437A52}.Release|x86.ActiveCfg = Release|Win32
13221329
{A22EC5F6-7851-4B88-AC52-47249D437A52}.Release|x86.Build.0 = Release|Win32
1330+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.AuditMode|Any CPU.ActiveCfg = AuditMode|x64
1331+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.AuditMode|ARM64.ActiveCfg = AuditMode|ARM64
1332+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.AuditMode|x64.ActiveCfg = AuditMode|x64
1333+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.AuditMode|x86.ActiveCfg = AuditMode|Win32
1334+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|Any CPU.ActiveCfg = Debug|Win32
1335+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|ARM64.ActiveCfg = Debug|ARM64
1336+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|ARM64.Build.0 = Debug|ARM64
1337+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|ARM64.Deploy.0 = Debug|ARM64
1338+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x64.ActiveCfg = Debug|x64
1339+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x64.Build.0 = Debug|x64
1340+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x64.Deploy.0 = Debug|x64
1341+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x86.ActiveCfg = Debug|Win32
1342+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x86.Build.0 = Debug|Win32
1343+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Debug|x86.Deploy.0 = Debug|Win32
1344+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|Any CPU.ActiveCfg = Release|Win32
1345+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|ARM64.ActiveCfg = Release|ARM64
1346+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|ARM64.Build.0 = Release|ARM64
1347+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|ARM64.Deploy.0 = Release|ARM64
1348+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x64.ActiveCfg = Release|x64
1349+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x64.Build.0 = Release|x64
1350+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x64.Deploy.0 = Release|x64
1351+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x86.ActiveCfg = Release|Win32
1352+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x86.Build.0 = Release|Win32
1353+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8}.Release|x86.Deploy.0 = Release|Win32
13231354
{767268EE-174A-46FE-96F0-EEE698A1BBC9}.AuditMode|Any CPU.ActiveCfg = AuditMode|Win32
13241355
{767268EE-174A-46FE-96F0-EEE698A1BBC9}.AuditMode|ARM64.ActiveCfg = AuditMode|ARM64
13251356
{767268EE-174A-46FE-96F0-EEE698A1BBC9}.AuditMode|ARM64.Build.0 = AuditMode|ARM64
@@ -1390,7 +1421,7 @@ Global
13901421
{CA5CAD1A-1754-4A9D-93D7-857A9D17CB1B} = {59840756-302F-44DF-AA47-441A9D673202}
13911422
{CA5CAD1A-44BD-4AC7-AC72-F16E576FDD12} = {59840756-302F-44DF-AA47-441A9D673202}
13921423
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {59840756-302F-44DF-AA47-441A9D673202}
1393-
{2C2BEEF4-9333-4D05-B12A-1905CBF112F9} = {59840756-302F-44DF-AA47-441A9D673202}
1424+
{2C2BEEF4-9333-4D05-B12A-1905CBF112F9} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
13941425
{EF3E32A7-5FF6-42B4-B6E2-96CD7D033F00} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
13951426
{16376381-CE22-42BE-B667-C6B35007008D} = {81C352DB-1818-45B7-A284-18E259F1CC87}
13961427
{F1995847-4AE5-479A-BBAF-382E51A63532} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
@@ -1399,14 +1430,16 @@ Global
13991430
{34DE34D3-1CD6-4EE3-8BD9-A26B5B27EC73} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
14001431
{84848BFA-931D-42CE-9ADF-01EE54DE7890} = {59840756-302F-44DF-AA47-441A9D673202}
14011432
{376FE273-6B84-4EB5-8B30-8DE9D21B022C} = {59840756-302F-44DF-AA47-441A9D673202}
1402-
{CA5CAD1A-9333-4D05-B12A-1905CBF112F9} = {59840756-302F-44DF-AA47-441A9D673202}
1433+
{CA5CAD1A-9333-4D05-B12A-1905CBF112F9} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
14031434
{CA5CAD1A-9A12-429C-B551-8562EC954746} = {59840756-302F-44DF-AA47-441A9D673202}
1404-
{CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506} = {59840756-302F-44DF-AA47-441A9D673202}
1435+
{CA5CAD1A-B11C-4DDB-A4FE-C3AFAE9B5506} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
14051436
{48D21369-3D7B-4431-9967-24E81292CF63} = {05500DEF-2294-41E3-AF9A-24E580B82836}
14061437
{CA5CAD1A-039A-4929-BA2A-8BEB2E4106FE} = {59840756-302F-44DF-AA47-441A9D673202}
14071438
{B0AC39D6-7B40-49A9-8202-58549BAE1FB1} = {59840756-302F-44DF-AA47-441A9D673202}
14081439
{58A03BB2-DF5A-4B66-91A0-7EF3BA01269A} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
14091440
{A22EC5F6-7851-4B88-AC52-47249D437A52} = {E8F24881-5E37-4362-B191-A3BA0ED7F4EB}
1441+
{A021EDFF-45C8-4DC2-BEF7-36E1B3B8CFE8} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
1442+
{BDB237B6-1D1D-400F-84CC-40A58FA59C8E} = {59840756-302F-44DF-AA47-441A9D673202}
14101443
{767268EE-174A-46FE-96F0-EEE698A1BBC9} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
14111444
EndGlobalSection
14121445
GlobalSection(ExtensibilityGlobals) = postSolution

src/cascadia/LocalTests_TerminalApp/ColorSchemeTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace TerminalAppLocalTests
2929
// details on that.
3030
BEGIN_TEST_CLASS(ColorSchemeTests)
3131
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
32-
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TerminalApp.LocalTests.AppxManifest.xml")
32+
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
3333
END_TEST_CLASS()
3434

3535
TEST_METHOD(CanLayerColorScheme);

src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace TerminalAppLocalTests
3232
// details on that.
3333
BEGIN_TEST_CLASS(KeyBindingsTests)
3434
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
35-
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TerminalApp.LocalTests.AppxManifest.xml")
35+
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
3636
END_TEST_CLASS()
3737

3838
TEST_METHOD(ManyKeysSameAction);

src/cascadia/LocalTests_TerminalApp/ProfileTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace TerminalAppLocalTests
2929
// details on that.
3030
BEGIN_TEST_CLASS(ProfileTests)
3131
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
32-
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TerminalApp.LocalTests.AppxManifest.xml")
32+
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
3333
END_TEST_CLASS()
3434

3535
TEST_METHOD(CanLayerProfile);

src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace TerminalAppLocalTests
3434
// details on that.
3535
BEGIN_TEST_CLASS(SettingsTests)
3636
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
37-
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TerminalApp.LocalTests.AppxManifest.xml")
37+
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
3838
END_TEST_CLASS()
3939

4040
TEST_METHOD(TryCreateWinRTType);

src/cascadia/LocalTests_TerminalApp/TabTests.cpp

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33

44
#include "pch.h"
55

6-
#include "../TerminalApp/ColorScheme.h"
6+
#include "../TerminalApp/TerminalPage.h"
7+
#include "../TerminalApp/MinMaxCloseControl.h"
8+
#include "../TerminalApp/TabRowControl.h"
9+
#include "../TerminalApp/ShortcutActionDispatch.h"
710
#include "../TerminalApp/Tab.h"
811
#include "../CppWinrtTailored.h"
12+
#include "JsonTestClass.h"
913

1014
using namespace Microsoft::Console;
1115
using namespace TerminalApp;
@@ -19,7 +23,7 @@ namespace TerminalAppLocalTests
1923
// an updated TAEF that will let us install framework packages when the test
2024
// package is deployed. Until then, these tests won't deploy in CI.
2125

22-
class TabTests
26+
class TabTests : public JsonTestClass
2327
{
2428
// For this set of tests, we need to activate some XAML content. For
2529
// release builds, the application runs as a centennial application,
@@ -34,18 +38,26 @@ namespace TerminalAppLocalTests
3438

3539
BEGIN_TEST_CLASS(TabTests)
3640
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
37-
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TerminalApp.LocalTests.AppxManifest.xml")
38-
TEST_CLASS_PROPERTY(L"UAP:Host", L"Xaml")
39-
TEST_CLASS_PROPERTY(L"UAP:WaitForXamlWindowActivation", L"true")
41+
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
4042
END_TEST_CLASS()
4143

4244
// These four tests act as canary tests. If one of them fails, then they
4345
// can help you identify if something much lower in the stack has
4446
// failed.
4547
TEST_METHOD(EnsureTestsActivate);
46-
TEST_METHOD(TryCreateLocalWinRTType);
48+
TEST_METHOD(TryCreateSettingsType);
49+
TEST_METHOD(TryCreateConnectionType);
4750
TEST_METHOD(TryCreateXamlObjects);
4851
TEST_METHOD(TryCreateTab);
52+
53+
TEST_METHOD(CreateSimpleTerminalXamlType);
54+
TEST_METHOD(CreateTerminalMuxXamlType);
55+
56+
TEST_CLASS_SETUP(ClassSetup)
57+
{
58+
InitializeJsonReader();
59+
return true;
60+
}
4961
};
5062

5163
void TabTests::EnsureTestsActivate()
@@ -56,7 +68,7 @@ namespace TerminalAppLocalTests
5668
VERIFY_IS_TRUE(true);
5769
}
5870

59-
void TabTests::TryCreateLocalWinRTType()
71+
void TabTests::TryCreateSettingsType()
6072
{
6173
// Verify we can create a WinRT type we authored
6274
// Just creating it is enough to know that everything is working.
@@ -68,6 +80,17 @@ namespace TerminalAppLocalTests
6880
VERIFY_ARE_NOT_EQUAL(oldFontSize, newFontSize);
6981
}
7082

83+
void TabTests::TryCreateConnectionType()
84+
{
85+
// Verify we can create a WinRT type we authored
86+
// Just creating it is enough to know that everything is working.
87+
winrt::Microsoft::Terminal::TerminalConnection::EchoConnection conn{};
88+
VERIFY_IS_NOT_NULL(conn);
89+
// We're doing this test seperately from the TryCreateSettingsType test,
90+
// to ensure both dependent binaries (TemrinalSettings and
91+
// TerminalConnection) both work individually.
92+
}
93+
7194
void TabTests::TryCreateXamlObjects()
7295
{
7396
auto result = RunOnUIThread([]() {
@@ -119,4 +142,26 @@ namespace TerminalAppLocalTests
119142
VERIFY_SUCCEEDED(result);
120143
}
121144

145+
void TabTests::CreateSimpleTerminalXamlType()
146+
{
147+
winrt::com_ptr<winrt::TerminalApp::implementation::MinMaxCloseControl> mmcc{ nullptr };
148+
149+
auto result = RunOnUIThread([&mmcc]() {
150+
mmcc = winrt::make_self<winrt::TerminalApp::implementation::MinMaxCloseControl>();
151+
VERIFY_IS_NOT_NULL(mmcc);
152+
});
153+
VERIFY_SUCCEEDED(result);
154+
}
155+
156+
void TabTests::CreateTerminalMuxXamlType()
157+
{
158+
winrt::com_ptr<winrt::TerminalApp::implementation::TabRowControl> tabRowControl{ nullptr };
159+
160+
auto result = RunOnUIThread([&tabRowControl]() {
161+
tabRowControl = winrt::make_self<winrt::TerminalApp::implementation::TabRowControl>();
162+
VERIFY_IS_NOT_NULL(tabRowControl);
163+
});
164+
VERIFY_SUCCEEDED(result);
165+
}
166+
122167
}

src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj

Lines changed: 11 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!-- A note about this project: We're building the test code dll from this
5+
project, but it _MUST_ be run in conjunction with the TestHostApp project.
6+
TestHostApp actually will build a TestHost executable and packaging bits
7+
that we can use to run our tests. We need TestHostApp so that our
8+
dependencies, like MUX, can be aggregated correctly, and resources properly
9+
combined into a resources.pri file.
10+
11+
TestHostApp will manually copy the output of this project into it's own
12+
OutDir, so we can run the tests from there. -->
13+
314
<PropertyGroup>
415
<ProjectGuid>{CA5CAD1A-b11c-4ddb-a4fe-c3afae9b5506}</ProjectGuid>
516
<Keyword>Win32Proj</Keyword>
@@ -101,85 +112,4 @@
101112
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.3.191217003-prerelease\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.3.191217003-prerelease\build\native\Microsoft.UI.Xaml.targets')" />
102113
<Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.0.0\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.0.0\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" />
103114

104-
<!-- This project will generate individual sxs manifests for each of our winrt libraries -->
105-
<Import Project="$(OpenConsoleDir)\build\rules\GenerateSxsManifestsFromWinmds.targets" />
106-
107-
<!-- This is important: actually add the _LocalTestsGenerateCombinedManifests
108-
target to the list of targets to run. -->
109-
<PropertyGroup>
110-
<BeforeLinkTargets Condition="'$(WindowsTargetPlatformVersion)' &gt;= '10.0.18362.0'">
111-
$(BeforeLinkTargets);
112-
_LocalTestsGenerateCombinedManifests;
113-
_LocalTestsBuildAppxManifest;
114-
_LocalTestsCopyDependencies;
115-
</BeforeLinkTargets>
116-
</PropertyGroup>
117-
118-
<!-- Step 1: Combine all our SxS manifests into a single SxS manifest. TAEF
119-
needs us to specify a single activation context at runtime, so we need a
120-
single file with all our types in it.-->
121-
<Target Name="_LocalTestsGenerateCombinedManifests"
122-
Inputs="@(_ConsoleWinmdManifest)"
123-
Outputs="$(OutDir)$(TargetName).manifest"
124-
DependsOnTargets="_ConsoleGenerateAdditionalWinmdManifests">
125-
126-
<Exec Command="mt.exe -manifest @(_ConsoleWinmdManifest, ' -manifest ') -out:$(OutDir)$(TargetName).manifest" />
127-
</Target>
128-
129-
<!-- Step 2: Take our combined SxS manifest, and use it to build an
130-
Appxmanifest.xml. We'll use the Appxmanifest.prototype.xml in this project's
131-
directory as a base, and the script will tak all our activatableClasses and
132-
turn them into appxmanifest-compatible Extensions -->
133-
<Target Name="_LocalTestsBuildAppxManifest"
134-
Inputs="$(OutDir)$(TargetName).manifest"
135-
Outputs="$(OutDir)$(TargetName).AppxManifest.xml"
136-
DependsOnTargets="_LocalTestsGenerateCombinedManifests">
137-
138-
<Exec Command="powershell.exe -noprofile –ExecutionPolicy Unrestricted $(OpenConsoleDir)\tools\GenerateAppxFromManifest.ps1 -SxSManifest $(OutDir)$(TargetName).manifest -AppxManifestPrototype $(TargetName).AppxManifest.prototype.xml -OutPath $(OutDir)$(TargetName).AppxManifest.xml" />
139-
140-
</Target>
141-
142-
<!-- Step 3: Manually copy all our dependent DLLs into our OutDir. For SxS
143-
activation to work, they all need to be in the same directory as our test dll.
144-
This is using code that's heavliy cribbed from WindowsTerminal.vcxproj, which
145-
is already cribbed from the GetPackagingOutputs in
146-
Microsoft.*.AppxPackage.targets. We're filtering this list down to the dlls,
147-
pris and xbfs, because this list _can_ contain directories, which will make
148-
the Copy task explode. -->
149-
150-
<PropertyGroup>
151-
<_ContinueOnError Condition="'$(BuildingProject)' == 'true'">true</_ContinueOnError>
152-
<_ContinueOnError Condition="'$(BuildingProject)' != 'true'">false</_ContinueOnError>
153-
</PropertyGroup>
154-
155-
<!-- First gather the files... -->
156-
<Target Name="MyGetPackagingOutputs" Returns="@(MyPackagingOutputs)">
157-
<MSBuild
158-
Projects="@(ProjectReferenceWithConfiguration)"
159-
Targets="GetPackagingOutputs"
160-
BuildInParallel="$(BuildInParallel)"
161-
Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
162-
Condition="'@(ProjectReferenceWithConfiguration)' != ''
163-
and '%(ProjectReferenceWithConfiguration.BuildReference)' == 'true'
164-
and '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == 'true'"
165-
ContinueOnError="$(_ContinueOnError)">
166-
<Output TaskParameter="TargetOutputs" ItemName="_PackagingOutputsFromOtherProjects"/>
167-
</MSBuild>
168-
169-
<ItemGroup>
170-
<!-- IMPORTANT: Grab all the xbf files _except_ App.xbf. If that's there, then the tests will hyperexplode. -->
171-
<MyPackagingOutputs Include="@(_PackagingOutputsFromOtherProjects)" Condition="'%(Extension)'=='.dll' Or '%(Extension)'=='.pri' Or ('%(Extension)'=='.xbf' And '%(Filename)' != 'App')" />
172-
</ItemGroup>
173-
</Target>
174-
175-
<!-- Then copy the files to our outdir -->
176-
<Target Name="_LocalTestsCopyDependencies"
177-
DependsOnTargets="MyGetPackagingOutputs">
178-
179-
<Copy SourceFiles="@(MyPackagingOutputs)"
180-
SkipUnchangedFiles="true"
181-
DestinationFolder="$(OutDir)"
182-
/>
183-
</Target>
184-
185115
</Project>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
3+
<Identity Name="WindowsTerminal.TestHost" Publisher="CN=Windows Terminal Team" Version="1.0.0.0" />
4+
<mp:PhoneIdentity PhoneProductId="fba054a7-f1a1-4cb7-bb21-4949919af2f5" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
5+
<Properties>
6+
<DisplayName>TestHostApp</DisplayName>
7+
<PublisherDisplayName>migrie</PublisherDisplayName>
8+
<Logo>taef.png</Logo>
9+
<uap:SupportedUsers>multiple</uap:SupportedUsers>
10+
</Properties>
11+
<Dependencies>
12+
<!-- We're manually setting the version here, because the CI only runs windows 17763 -->
13+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.17763.0" />
14+
</Dependencies>
15+
<Resources>
16+
<Resource Language="x-generate" />
17+
</Resources>
18+
<Applications>
19+
<Application Id="taef.executionengine.universal.App" Executable="$targetnametoken$.exe" EntryPoint="TestHostApp.App">
20+
<uap:VisualElements DisplayName="TestHostApp" Square150x150Logo="taef.png" Square44x44Logo="taef.png" Description="TestHostApp" BackgroundColor="transparent">
21+
<uap:DefaultTile Wide310x150Logo="taef.png">
22+
</uap:DefaultTile>
23+
<uap:SplashScreen Image="taef.png" />
24+
</uap:VisualElements>
25+
</Application>
26+
</Applications>
27+
</Package>

0 commit comments

Comments
 (0)