Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion TestFx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NetCore", "NetCore", "{D11C
src\Adapter\Build\NetCore\MSTest.TestAdapter.props = src\Adapter\Build\NetCore\MSTest.TestAdapter.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformServices.WinUI", "src\Adapter\PlatformServices.WinUI\PlatformServices.WinUI.csproj", "{F4E2876F-6E42-4DCF-B629-041A9DF7C579}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinUI", "WinUI", "{35D010CC-CDF2-4115-BCFB-E2E3D21C1055}"
ProjectSection(SolutionItems) = preProject
src\Adapter\Build\WinUI\MSTest.TestAdapter.props = src\Adapter\Build\WinUI\MSTest.TestAdapter.props
src\Adapter\Build\WinUI\MSTest.TestAdapter.targets = src\Adapter\Build\WinUI\MSTest.TestAdapter.targets
EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Adapter\PlatformServices.Shared\PlatformServices.Shared.projitems*{2177c273-ae07-43b3-b87a-443e47a23c5a}*SharedItemsImports = 13
src\TestFramework\Extension.Shared\Extension.Shared.projitems*{272ca5e1-8e81-4825-9e47-86cce02f700d}*SharedItemsImports = 13
src\TestFramework\Extension.Shared\Extension.Shared.projitems*{23b9d9a2-4aee-47e6-97b5-060df21539fb}*SharedItemsImports = 5
src\TestFramework\Extension.Shared\Extension.Shared.projitems*{272ca5e1-8e81-4825-9e47-86cce02f700d}*SharedItemsImports = 13
src\TestFramework\Extension.Shared\Extension.Shared.projitems*{df131865-84ee-4540-8112-e88acebdea09}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -1197,6 +1205,30 @@ Global
{23B9D9A2-4AEE-47E6-97B5-060DF21539FB}.Release|x64.Build.0 = Release|Any CPU
{23B9D9A2-4AEE-47E6-97B5-060DF21539FB}.Release|x86.ActiveCfg = Release|Any CPU
{23B9D9A2-4AEE-47E6-97B5-060DF21539FB}.Release|x86.Build.0 = Release|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|Any CPU.Build.0 = Debug|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|ARM.ActiveCfg = Debug|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|ARM.Build.0 = Debug|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|x64.ActiveCfg = Debug|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|x64.Build.0 = Debug|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|x86.ActiveCfg = Debug|x86
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Code Analysis Debug|x86.Build.0 = Debug|x86
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|ARM.ActiveCfg = Debug|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|ARM.Build.0 = Debug|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|x64.ActiveCfg = Debug|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|x64.Build.0 = Debug|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|x86.ActiveCfg = Debug|x86
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Debug|x86.Build.0 = Debug|x86
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|Any CPU.Build.0 = Release|Any CPU
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|ARM.ActiveCfg = Release|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|ARM.Build.0 = Release|ARM
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|x64.ActiveCfg = Release|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|x64.Build.0 = Release|x64
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|x86.ActiveCfg = Release|x86
{F4E2876F-6E42-4DCF-B629-041A9DF7C579}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1263,6 +1295,8 @@ Global
{E5E58613-82FC-44CD-B75F-4F1C7ED52D0D} = {D53BD452-F69F-4FB3-8B98-386EDA28A4C8}
{23B9D9A2-4AEE-47E6-97B5-060DF21539FB} = {E48AC786-E150-4F41-9A16-32F02E4493D8}
{D11C6664-1C4E-48F0-AA92-7F5BADC6F82C} = {CA01DAF5-8D9D-496E-9AD3-94BB7FBB2D34}
{F4E2876F-6E42-4DCF-B629-041A9DF7C579} = {24088844-2107-4DB2-8F3F-CBCA94FC4B28}
{35D010CC-CDF2-4115-BCFB-E2E3D21C1055} = {CA01DAF5-8D9D-496E-9AD3-94BB7FBB2D34}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {31E0F4D5-975A-41CC-933E-545B2201FAF9}
Expand Down
33 changes: 33 additions & 0 deletions src/Adapter/Build/WinUI/MSTest.TestAdapter.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)..\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)\Microsoft.TestPlatform.AdapterUtilities.dll">
<Link>Microsoft.TestPlatform.AdapterUtilities.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
</ItemGroup>

<ItemGroup>
<!-- Including `@(TestAdapterContent)` in the `None` ItemGroup to get the `CopyToOutputDirectory`
behavior be default, package consumers can opt-out of this behavior
by removing `@(TestAdapterContent)` from the `None` ItemGroup
i.e. `<None Remove="@(TestAdapterContent)" />` -->
<None Include="@(TestAdapterContent)" />
</ItemGroup>
</Project>
42 changes: 42 additions & 0 deletions src/Adapter/Build/WinUI/MSTest.TestAdapter.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableMSTestV2CopyResources Condition="$(EnableMSTestV2CopyResources) == ''">true</EnableMSTestV2CopyResources>
</PropertyGroup>

<Target Name="GetMSTestV2CultureHierarchy">
<!-- Only traversing 5 levels in the culture hierarchy. This is the maximum lenght for all cultures and should be sufficient to get to a culture name that maps to a resource folder we package.
The root culture name for all cultures is invariant whose name is ''(empty) and the parent for invariant culture is invariant itself.(https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.parent(v=vs.110).aspx.)
So the below code should not break build in any case. -->
<ItemGroup>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Name)" />
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Name)"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Name) != ''"/>
<CurrentUICultureHierarchy Include="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name)" Condition="$([System.Globalization.CultureInfo]::CurrentUICulture.Parent.Parent.Parent.Parent.Name) != ''"/>
</ItemGroup>
</Target>

<!-- Copy resources over to $(TargetDir) if this is a localized build. -->
<Target Name="CopyMSTestV2Resources" BeforeTargets="PrepareForBuild" Condition="$(EnableMSTestV2CopyResources) == 'true'" DependsOnTargets="GetMSTestV2CultureHierarchy">

<PropertyGroup>
<CurrentUICultureHierarchy>%(CurrentUICultureHierarchy.Identity)</CurrentUICultureHierarchy>
</PropertyGroup>

<ItemGroup>
<MSTestV2Files Include="$(MSBuildThisFileDirectory)..\_common\*.dll" />
</ItemGroup>

<ItemGroup>
<Content Include="@(MSTestV2Files->'%(RootDir)%(Directory)$(CurrentUICultureHierarchy)\%(FileName).resources.dll')"
Condition="Exists('%(RootDir)%(Directory)$(CurrentUICultureHierarchy)\%(FileName).resources.dll')">
<Link>$(CurrentUICultureHierarchy)\%(FileName).resources.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<BaseAssemblyFullPath>%(FullPath)</BaseAssemblyFullPath>
<Visible>False</Visible>
</Content>
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public RecursiveDirectoryPath(string dirPath, bool includeSubDirectories)
/// The <see cref="object"/>.
/// </returns>
[SecurityCritical]
#if NET5_0
[Obsolete]
#endif
public override object InitializeLifetimeService()
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public bool Deploy(IEnumerable<TestCase> tests, IRunContext runContext, IFramewo
}

// Object model currently does not have support for SuspendCodeCoverage. We can remove this once support is added
#if !NETSTANDARD1_5
#if !NETSTANDARD1_5 && !NET5_0
using (new SuspendCodeCoverage())
#endif
{
Expand Down
7 changes: 7 additions & 0 deletions src/Adapter/PlatformServices.WinUI/Friends.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

// Friend assemblies
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.WinUI.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
102 changes: 102 additions & 0 deletions src/Adapter/PlatformServices.WinUI/PlatformServices.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TestFxRoot Condition="$(TestFxRoot) == ''">..\..\..\</TestFxRoot>
<FrameworkIdentifier>NetCore</FrameworkIdentifier>
</PropertyGroup>
<Import Project="$(TestFxRoot)scripts\build\TestFx.Settings.targets" />
<PropertyGroup>
<RootNamespace>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</RootNamespace>
<AssemblyName>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</AssemblyName>
<TargetFramework>net5.0-windows10.0.18362.0</TargetFramework>

<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>$(TargetPlatformMinVersion)</SupportedOSPlatformVersion>

<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<UseSharedResources>true</UseSharedResources>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Constants.cs">
<Link>Constants.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10ReflectionOperations.cs">
<Link>Services\ns10ReflectionOperations.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10DiaSessionOperations.cs">
<Link>Services\ns10DiaSessionOperations.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TestContextImplementation.cs">
<Link>Services\ns10TestContextImplementation.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TestDataSource.cs">
<Link>Services\ns10TestDataSource.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Services\ns13TestDeployment.cs">
<Link>Services\ns13TestDeployment.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Utilities\ns13DeploymentItemUtility.cs" Link="Utilities\ns13DeploymentItemUtility.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Utilities\ns13DeploymentUtilityBase.cs" Link="Utilities\ns13DeploymentUtilityBase.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Utilities\ns13FileUtility.cs" Link="Utilities\ns13FileUtility.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Services\ns13MSTestAdapterSettings.cs" Link="Services\ns13MSTestAdapterSettings.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\ns13DeploymentItem.cs" Link="Deployment\ns13DeploymentItem.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Utilities\ns10Validate.cs" Link="Utilities\ns10Validate.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Extensions\ns13ExceptionExtensions.cs" Link="Extensions\ns13ExceptionExtensions.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10MSTestSettingsProvider.cs" Link="Services\ns10MSTestSettingsProvider.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.0\ns10RecursiveDirectoryPath.cs" Link="ns10RecursiveDirectoryPath.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TestContextPropertyStrings.cs" Link="Services\ns10TestContextPropertyStrings.cs" />
<Compile Include="..\PlatformServices.NetCore\Utilities\NetCoreReflectionUtility.cs" Link="Utilities\NetCoreReflectionUtility.cs"/>
<Compile Include="..\PlatformServices.NetCore\Utilities\NetCoreDeploymentUtility.cs" Link="Utilities\NetCoreDeploymentUtility.cs"/>
<Compile Include="..\PlatformServices.NetCore\Deployment\NetCoreTestRunDirectories.cs" Link="Deployment\NetCoreTestRunDirectories.cs" />
<Compile Include="..\PlatformServices.NetCore\Utilities\NetCoreAssemblyUtility.cs" Link="Utilities\NetCoreAssemblyUtility.cs" />
<Compile Include="..\PlatformServices.NetCore\Services\NetCoreTestSourceHost.cs" Link="Services\NetCoreTestSourceHost.cs" />
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10ThreadOperations.cs">
<Link>Services\ns10ThreadOperations.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TraceListener.cs">
<Link>Services\ns10TraceListener.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TraceListenerManager.cs">
<Link>Services\ns10TraceListenerManager.cs</Link>
</Compile>
<Compile Include="Friends.cs" />
<Compile Include="Services\WinUIAdapterTraceLogger.cs" />
<Compile Include="Services\WinUIFileOperations.cs" />
<Compile Include="Services\WinUITestSource.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Folder Include="Resources\" />
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Resources\Resource.Designer.cs">
<Link>Resources\Resource.Designer.cs</Link>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="..\PlatformServices.Shared\netstandard1.3\Resources\Resource.resx">
<Link>Resources\Resource.resx</Link>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<CustomToolNamespace>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="$(TestPlatformVersion)" />
<PackageReference Include="System.Diagnostics.TextWriterTraceListener" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\TestFramework\Extension.Core\Extension.Core.csproj" />
<ProjectReference Include="..\..\TestFramework\MSTest.Core\MSTest.Core.csproj" />
<ProjectReference Include="..\PlatformServices.Interface\PlatformServices.Interface.csproj" />
<ProjectReference Include="..\..\TestFramework\Extension.Core\Extension.Core.csproj" />
<ProjectReference Include="..\..\TestFramework\MSTest.Core\MSTest.Core.csproj" />
</ItemGroup>

<Import Project="$(TestFxRoot)scripts\build\TestFx.targets" />
</Project>
34 changes: 34 additions & 0 deletions src/Adapter/PlatformServices.WinUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

// This is set by GlobalAssemblyInfo which is auto-generated due to import of Microbuild.Settings.targets
// [assembly: AssemblyVersion("1.0.0.0")]
// [assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

[assembly: TypeForwardedTo(typeof(SerializableAttribute))]
[assembly: TypeForwardedTo(typeof(MarshalByRefObject))]
1 change: 1 addition & 0 deletions src/Adapter/PlatformServices.WinUI/Resources/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is kept to commit Resources directory as language specific resx files needs to be copied here.
Loading