Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment Item support in .NET Core #565

Merged
merged 36 commits into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6fb66eb
depItemInNetcoreWithoutUT
ankit-arora12 Feb 8, 2019
16739e0
Merge branch 'master' into depItemNetCore
abhishkk Feb 8, 2019
48e4b7a
Resources file changes
ankit-arora12 Feb 12, 2019
536dfac
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Feb 12, 2019
e83349b
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Feb 12, 2019
fc9ec88
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Feb 12, 2019
928d8c6
Resources handling and renaming files
ankit-arora12 Feb 13, 2019
008fda4
Merge branch 'master' into depItemNetCore
ankit-arora-gh Feb 13, 2019
42d3a81
Adding UT's
ankit-arora12 Feb 19, 2019
9eeaf02
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Feb 19, 2019
cfa90b8
PR comments
ankit-arora12 Mar 4, 2019
f40b346
PR comment variable assign
ankit-arora12 Mar 4, 2019
707ef00
Test Cases restructuring
ankit-arora12 Mar 7, 2019
62649d5
E2E and test context
ankit-arora12 Mar 12, 2019
ead5ea5
ut fix
ankit-arora12 Mar 12, 2019
3986e88
renaming and moving files
ankit-arora12 Mar 12, 2019
a1260cd
pragma File name must match first type name
ankit-arora12 Mar 12, 2019
ec9e3ae
remove duplicate reference
ankit-arora12 Mar 12, 2019
043a51a
testing to remove duplicacy by version change
ankit-arora12 Mar 12, 2019
47788cf
fix for issue occuring only in jenkins
ankit-arora12 Mar 13, 2019
24bc0f7
fix for issue occuring only in jenkins
ankit-arora12 Mar 13, 2019
54f15b1
netcore test version upgrade and file operations separate
ankit-arora12 Mar 18, 2019
df9df0f
Merge remote-tracking branch 'upstream/master' into depItemNetCore
ankit-arora12 Mar 25, 2019
aa23712
jenkins issue with duplicate libraries
ankit-arora12 Mar 26, 2019
2108a2d
jenkins issue with duplicate libraries
ankit-arora12 Mar 26, 2019
f6d969e
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Mar 26, 2019
3437d95
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Mar 26, 2019
7fcc434
jenkins duplicacy
ankit-arora12 Mar 26, 2019
2cf41d5
Merge branch 'depItemNetCore' of https://github.com/ankit-nitd/testfx…
ankit-arora12 Mar 26, 2019
0e666ca
smoke fix post debug changes
ankit-arora12 Mar 26, 2019
b7466e2
fix spacing
ankit-arora12 Mar 27, 2019
2e4c598
pragma
ankit-arora12 Mar 27, 2019
737abcb
removing comment and pubxml
ankit-arora12 Apr 1, 2019
a7c6883
testfx conflict resolve
ankit-arora12 Apr 1, 2019
6396799
changes in accordance with timeout commit
ankit-arora12 Apr 1, 2019
2989544
Merge remote-tracking branch 'upstream/master' into depItemNetCore
ankit-arora12 Apr 2, 2019
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
29 changes: 27 additions & 2 deletions scripts/build/TestFx.Loc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<!-- Default Localization folder. -->
<PropertyGroup>
<ResourceDirectory>$(ProjectDir)Resources</ResourceDirectory>
<SharedResourceDirectory>$(ProjectDir)..\PlatformServices.Shared\netstandard1.3\Resources</SharedResourceDirectory>
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<Target Name="GatherResxResources">
Expand All @@ -20,11 +21,14 @@
</PropertyGroup>
</Target>

<!-- Localization for Libraries.-->
<!-- Localization for Libraries.
'UseSharedResources' flag is true for desktop and netcore as their resources are common and present at a shared location -->
<Target Name="TestFxLocalization" Condition="$(IsVsixProj) =='' and $(IsVsixProj) !='true'" BeforeTargets="BeforeBuild" DependsOnTargets="GatherResxResources">
<CallTarget Targets="CreateLocalizeXLF;CreateLocalizeResx" Condition="'$(HasResxResources)' == 'true'"/>
<CallTarget Targets="CreateLocalizeXLF;CreateLocalizeResx" Condition="'$(HasResxResources)' == 'true' and '$(UseSharedResources)' == ''"/>
<CallTarget Targets="CreateLocalizeXLFShared;CreateLocalizeResxShared" Condition="'$(HasResxResources)' == 'true' and '$(UseSharedResources)' == 'true'"/>
</Target>

<!-- Generate xlf files from Resources.resx by using command Build.cmd -uxlf -->
<Target Name="CreateLocalizeXLF" Condition="'$(UpdateXlf)' == 'true'">
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
Expand All @@ -33,6 +37,16 @@
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe update -Resx %(ResxResources.Identity) -Xlf $(ResourceDirectory)\xlf\%(ResxResources.Filename).xlf" />
</Target>

<!-- Generate xlf files from Resources.resx for shared resources by using command Build.cmd -uxlf -->
<Target Name="CreateLocalizeXLFShared" Condition="'$(UpdateXlf)' == 'true'">
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
</CreateItem>
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe update -Resx %(LocResourceFile.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf" />
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe update -Resx %(ResxResources.Identity) -Xlf $(SharedResourceDirectory)\xlf\%(ResxResources.Filename).xlf" />
</Target>

<!-- Generate language specific resx files from the xlf files -->
<Target Name="CreateLocalizeResx" Condition="'$(IsLocalizedBuild)' == 'true'">
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
Expand All @@ -42,6 +56,17 @@
<EmbeddedResource Include="$(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx" />
</ItemGroup>
</Target>

<!-- Generate language specific resx files from the xlf files for shared resources -->
<Target Name="CreateLocalizeResxShared" Condition="'$(IsLocalizedBuild)' == 'true'">
<CreateItem Include="@(ResxResources)" AdditionalMetadata="Language=%(ResxLang.Identity)">
<Output ItemName="LocResourceFile" TaskParameter="Include"/>
</CreateItem>
<Exec Command="$(TestFxPackagesRoot)fmdev.xlftool.0.1.3\tools\xlftool.exe writeTarget -Xlf $(SharedResourceDirectory)\xlf\%(LocResourceFile.Filename).%(LocResourceFile.Language).xlf -Resx $(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx -verbose" />
<ItemGroup>
<EmbeddedResource Include="$(ResourceDirectory)\%(LocResourceFile.Filename).%(LocResourceFile.Language).resx" />
</ItemGroup>
</Target>

<!-- Localization for documentation files. -->
<Target Name="CopyLocalizedXmls" BeforeTargets="BeforeBuild" Condition="$(LocDocumentationSubPath) != ''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<RootNamespace>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</RootNamespace>
<AssemblyName>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseSharedResources>true</UseSharedResources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -44,6 +45,48 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\ns10RecursiveDirectoryPath.cs">
<Link>ns10RecursiveDirectoryPath.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10MSTestSettingsProvider.cs">
<Link>Services\ns10MSTestSettingsProvider.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Services\ns10TestContextPropertyStrings.cs">
<Link>Services\ns10TestContextPropertyStrings.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.0\Utilities\ns10Validate.cs">
<Link>Utilities\ns10Validate.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Extensions\ns13ExceptionExtensions.cs">
<Link>Extensions\ns13ExceptionExtensions.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\ns13DeploymentItem.cs">
<Link>Deployment\ns13DeploymentItem.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\ns13TestRunDirectories.cs">
<Link>Deployment\ns13TestRunDirectories.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Resources\Resource.Designer.cs">
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved
<Link>Resources\Resource.Designer.cs</Link>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Services\ns13MSTestAdapterSettings.cs">
<Link>Services\ns13MSTestAdapterSettings.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</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Utilities\ns13DeploymentUtilityBase.cs">
<Link>Utilities\ns13DeploymentUtilityBase.cs</Link>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Utilities\ns13FileUtility.cs">
<Link>Utilities\ns13FileUtility.cs</Link>
</Compile>
<Compile Include="AssemblyResolver.cs" />
<Compile Include="Constants.cs" />
<Compile Include="Data\CsvDataConnection.cs" />
Expand All @@ -55,19 +98,10 @@
<Compile Include="Data\TestDataConnectionSql.cs" />
<Compile Include="Data\XmlDataConnection.cs" />
<Compile Include="Deployment\AssemblyLoadWorker.cs" />
<Compile Include="Deployment\DeploymentItem.cs" />
<Compile Include="Deployment\TestRunDirectories.cs" />
<Compile Include="Extensions\ExceptionExtensions.cs" />
<Compile Include="Friends.cs" />
<Compile Include="Services\MSTestAdapterSettings.cs" />
<Compile Include="Utilities\AppDomainWrapper.cs" />
<Compile Include="Utilities\IAppDomain.cs" />
<Compile Include="Utilities\SequentialIntPermutation.cs" />
<Compile Include="Resources\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
<Compile Include="..\PlatformServices.Shared\netstandard1.3\Services\ns13TraceListener.cs">
<Link>Services\ns13TraceListener.cs</Link>
</Compile>
Expand All @@ -78,23 +112,17 @@
<Compile Include="Services\DesktopReflectionOperations.cs" />
<Compile Include="Services\DesktopThreadOperations.cs" />
<Compile Include="Services\DesktopFileOperations.cs" />
<Compile Include="Services\MSTestSettingsProvider.cs" />
<Compile Include="Services\DesktopTestDataSource.cs" />
<Compile Include="Services\DesktopTestDeployment.cs" />
<Compile Include="Services\DesktopTestSource.cs" />
<Compile Include="Services\DesktopTestSourceHost.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RecursiveDirectoryPath.cs" />
<Compile Include="Services\DesktopTestContextImplementation.cs" />
<Compile Include="Utilities\AppDomainUtilities.cs" />
<Compile Include="Utilities\AssemblyUtility.cs" />
<Compile Include="Utilities\DeploymentItemUtility.cs" />
<Compile Include="Utilities\DeploymentUtility.cs" />
<Compile Include="Utilities\FileUtility.cs" />
<Compile Include="Utilities\DesktopAssemblyUtility.cs" />
<Compile Include="Utilities\DesktopDeploymentUtility.cs" />
<Compile Include="Utilities\IAssemblyUtility.cs" />
<Compile Include="Utilities\RandomIntPermutation.cs" />
<Compile Include="Utilities\ReflectionUtility.cs" />
<Compile Include="Utilities\Validate.cs" />
<Compile Include="Utilities\DesktopReflectionUtility.cs" />
<Compile Include="Utilities\VSInstallationUtilities.cs" />
<Compile Include="Utilities\XmlUtilities.cs" />
</ItemGroup>
Expand All @@ -119,12 +147,14 @@
<None Include="packages.config" />
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Resource.resx">
<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>
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<Import Project="$(TestFxRoot)scripts\build\TestFx.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -463,26 +463,4 @@ private void InitializeProperties()
this.properties[TestContextPropertyStrings.TestName] = this.testMethod.Name;
}
}

#pragma warning restore SA1649 // SA1649FileNameMustMatchTypeName
#pragma warning disable SA1402 // File may only contain a single class

/// <summary>
/// Test Context Property Names.
/// </summary>
internal static class TestContextPropertyStrings
#pragma warning restore SA1402 // File may only contain a single class
{
public static readonly string TestRunDirectory = "TestRunDirectory";
public static readonly string DeploymentDirectory = "DeploymentDirectory";
public static readonly string ResultsDirectory = "ResultsDirectory";
public static readonly string TestRunResultsDirectory = "TestRunResultsDirectory";
public static readonly string TestResultsDirectory = "TestResultsDirectory";
public static readonly string TestDir = "TestDir";
public static readonly string TestDeploymentDir = "TestDeploymentDir";
public static readonly string TestLogsDir = "TestLogsDir";

public static readonly string FullyQualifiedTestClassName = "FullyQualifiedTestClassName";
public static readonly string TestName = "TestName";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Extensions;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface;

using UTF = Microsoft.VisualStudio.TestTools.UnitTesting;

#pragma warning disable SA1649 // SA1649FileNameMustMatchTypeName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Uti
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;

#pragma warning disable SA1649 // File name must match first type name
ankit-nitd-zz marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Utility for assembly specific functionality.
/// </summary>
Expand Down
Loading