Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
smadala committed Oct 21, 2016
2 parents 4884bd5 + 794c117 commit 1868a82
Show file tree
Hide file tree
Showing 302 changed files with 25,679 additions and 624 deletions.
6 changes: 6 additions & 0 deletions TestPlatform.sln
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.TestPlatform.ObjectModel.PlatformTests", "test\Performance\Microsoft.TestPlatform.ObjectModel.PlatformTests\Microsoft.TestPlatform.ObjectModel.PlatformTests.xproj", "{A4025AA7-FE2C-47B4-AB22-5FA32D0CA234}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PerfTestProject", "test\TestAssets\PerfTestProject\PerfTestProject.xproj", "{96B93E28-A33D-48E5-8793-73F686D3B999}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "testhost.UnitTests", "test\testhost.UnitTests\testhost.UnitTests.xproj", "{09599F77-A1F2-4366-BB8A-B4B90E05BCBC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -259,6 +260,10 @@ Global
{96B93E28-A33D-48E5-8793-73F686D3B999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96B93E28-A33D-48E5-8793-73F686D3B999}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96B93E28-A33D-48E5-8793-73F686D3B999}.Release|Any CPU.Build.0 = Release|Any CPU
{09599F77-A1F2-4366-BB8A-B4B90E05BCBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09599F77-A1F2-4366-BB8A-B4B90E05BCBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09599F77-A1F2-4366-BB8A-B4B90E05BCBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09599F77-A1F2-4366-BB8A-B4B90E05BCBC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -306,5 +311,6 @@ Global
{03FC3BAA-417B-460B-B9EF-AB9A4D2A974A} = {D8EF073C-279A-4279-912D-E9D4B0635E17}
{A4025AA7-FE2C-47B4-AB22-5FA32D0CA234} = {44DABCFB-7AA0-4682-B7F7-067E0ABA1D14}
{96B93E28-A33D-48E5-8793-73F686D3B999} = {50D7D355-08F6-4DFD-AEAA-9BCE41C94C18}
{09599F77-A1F2-4366-BB8A-B4B90E05BCBC} = {463031A2-7F16-4E38-9944-1F5161D04933}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion dogfood/UnitTestProject/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1.0.0-*",

"dependencies": {
"MSTest.TestFramework": "1.0.0-preview"
"MSTest.TestFramework": "1.0.4-preview"
},

"frameworks": {
Expand Down
5 changes: 3 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ function Create-NugetPackages
$tpSrcDir = Join-Path $env:TP_ROOT_DIR "src"

# Copy over the nuspecs to the staging directory
$nuspecFiles = @("TestPlatform.TranslationLayer.nuspec", "TestPlatform.ObjectModel.nuspec", "TestPlatform.TestHost.nuspec", "TestPlatform.nuspec", "TestPlatform.CLI.nuspec", "TestPlatform.Build.nuspec")
$nuspecFiles = @("TestPlatform.TranslationLayer.nuspec", "TestPlatform.ObjectModel.nuspec", "TestPlatform.TestHost.nuspec", "TestPlatform.nuspec", "TestPlatform.CLI.nuspec", "TestPlatform.Build.nuspec", "Microsoft.Net.Test.Sdk.nuspec")
$targetFiles = @("Microsoft.Net.Test.Sdk.targets")
# Nuget pack analysis emits warnings if binaries are packaged as content. It is intentional for the below packages.
$skipAnalysis = @("TestPlatform.CLI.nuspec")
foreach ($file in $nuspecFiles) {
foreach ($file in $nuspecFiles + $targetFiles) {
Copy-Item $tpSrcDir\$file $stagingDir -Force
}

Expand Down
20 changes: 20 additions & 0 deletions src/Microsoft.NET.Test.Sdk.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Microsoft.NET.Test.Sdk</id>
<version>1.0.0-preview</version>
<title>The MSbuild targets and properties for building the .Net core test projects.</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The MSbuild targets and properties for building the .Net core test projects.</description>
<copyright>Copyright 2015</copyright>
<dependencies>
<dependency id="Microsoft.TestPlatform.TestHost" version="15.0.0-preview-20161012-02" />
</dependencies>
</metadata>
<files>
<file src="Microsoft.NET.Test.Sdk.targets" target="build\netcoreapp1.0\" />
<file src="Microsoft.NET.Test.Sdk.targets" target="build\net46\" />
</files>
</package>
65 changes: 65 additions & 0 deletions src/Microsoft.NET.Test.Sdk.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!--
***********************************************************************************************
Microsoft.NET.Test.Sdk.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your test projects from the command-line or the IDE.
Copyright (c) Microsoft. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
============================================================
GenerateProgramFile
Generates Program file which contains the Main entry point
============================================================
-->
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<GeneratedProgramFile Condition="'$(GeneratedProgramFile)' ==''">$(IntermediateOutputPath)$(MSBuildProjectName).Program$(DefaultLanguageSourceExtension)</GeneratedProgramFile>
<GenerateProgramFile Condition="'$(GenerateProgramFile)' == ''">true</GenerateProgramFile>
</PropertyGroup>
<!--
Note that this must run before every invocation of CoreCompile to ensure that all
compiler runs see the generated Program file. Furthermore, we must run *after*
PrepareForBuild to ensure that the intermediate directory has been created.
-->

<Target Name="GenerateProgramFile"
BeforeTargets="CoreCompile"
DependsOnTargets="PrepareForBuild;CoreGenerateProgramFile"
Condition="'$(GenerateProgramFile)' == 'true'" />

<Target Name="CoreGenerateProgramFile"
Condition="'$(Language)'=='VB' or '$(Language)'=='C#'"
Inputs="$(MSBuildAllProjects)"
Outputs="$(GeneratedProgramFile)">

<ItemGroup Condition="'$(Language)'=='C#'">
<Line Include="using System%3b "/>
<Line Include="class Program {static void Main(string[] args){}}"/>
</ItemGroup>

<ItemGroup Condition="'$(Language)'=='VB'">
<Line Include="Imports System"/>
<Line Include="Module Program"/>
<Line Include="Sub Main(args As String())"/>
<Line Include="End Sub"/>
<Line Include="End Module"/>
</ItemGroup>
<WriteLinesToFile
File="$(GeneratedProgramFile)" Lines="@(Line)" Overwrite="true" Encoding="Unicode">
</WriteLinesToFile>

<!--
Compile Include the generated Program File
-->
<ItemGroup>
<Compile Include="$(GeneratedProgramFile)"/>
</ItemGroup>
</Target>
</Project>
26 changes: 18 additions & 8 deletions src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.DesignMode
using System.Threading;
using System.Threading.Tasks;

using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities;
using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using System.Diagnostics;

/// <summary>
/// The design mode client.
Expand Down Expand Up @@ -47,6 +45,9 @@ public DesignModeClient()
/// <param name="communicationManager">
/// The communication manager.
/// </param>
/// <param name="dataSerializer">
/// The data Serializer.
/// </param>
internal DesignModeClient(ICommunicationManager communicationManager, IDataSerializer dataSerializer)
{
this.communicationManager = communicationManager;
Expand All @@ -69,16 +70,21 @@ public static void Initialize()
/// <summary>
/// Creates a client and waits for server to accept connection asynchronously
/// </summary>
/// <param name="port">port number to connect</param>
/// <param name="port">
/// Port number to connect
/// </param>
/// <param name="testRequestManager">
/// The test Request Manager.
/// </param>
public void ConnectToClientAndProcessRequests(int port, ITestRequestManager testRequestManager)
{
EqtTrace.Info("Trying to connect to server on port : {0}", port);
this.communicationManager.SetupClientAsync(port);
this.communicationManager.SendMessage(MessageType.SessionConnected);

// Wait for the connection to the server and listen for requests.
if (this.communicationManager.WaitForServerConnection(ClientListenTimeOut))
{
this.communicationManager.SendMessage(MessageType.SessionConnected);
this.ProcessRequests(testRequestManager);
}
else
Expand All @@ -99,7 +105,9 @@ public void HandleParentProcessExit()
/// <summary>
/// Process Requests from the IDE
/// </summary>
/// <param name="handler"></param>
/// <param name="testRequestManager">
/// The test Request Manager.
/// </param>
private void ProcessRequests(ITestRequestManager testRequestManager)
{
var isSessionEnd = false;
Expand Down Expand Up @@ -202,7 +210,9 @@ private void ProcessRequests(ITestRequestManager testRequestManager)
/// <summary>
/// Send a custom host launch message to IDE
/// </summary>
/// <param name="customTestHostLaunchPayload">Payload required to launch a custom host</param>
/// <param name="testProcessStartInfo">
/// The test Process Start Info.
/// </param>
public int LaunchCustomHost(TestProcessStartInfo testProcessStartInfo)
{
lock (ackLockObject)
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.Execution
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Microsoft.VisualStudio.TestPlatform.Utilities;

using Resources = Microsoft.VisualStudio.TestPlatform.Client.Resources;
using ClientResources = Microsoft.VisualStudio.TestPlatform.Client.Resources.Resources;

public class TestRunRequest : ITestRunRequest, ITestRunEventsHandler
{
Expand Down Expand Up @@ -48,7 +48,7 @@ public int ExecuteAsync()

if (this.State != TestRunState.Pending)
{
throw new InvalidOperationException(Resources.InvalidStateForExecution);
throw new InvalidOperationException(ClientResources.InvalidStateForExecution);
}

EqtTrace.Info("TestRunRequest.ExecuteAsync: Starting run with settings:{0}", this.testRunCriteria);
Expand Down Expand Up @@ -100,7 +100,7 @@ public bool WaitForCompletion(int timeout)
|| this.State == TestRunState.Aborted))
{
// If run is already terminated, then we should not throw an exception.
throw new InvalidOperationException(Resources.WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive);
throw new InvalidOperationException(ClientResources.WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive);
}

// This method is not synchronized as it can lead to dead-lock
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.cs.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.de.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.es.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.it.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
17 changes: 17 additions & 0 deletions src/Microsoft.TestPlatform.Client/Resources/xlf/Resources.ja.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../Resources.resx">
<body>
<trans-unit id="InvalidStateForExecution">
<source>The test run could not be executed because the initial state was invalid.</source>
<target state="new">The test run could not be executed because the initial state was invalid.</target>
<note></note>
</trans-unit>
<trans-unit id="WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive">
<source>Wait for completion operation is not allowed when there is no active test run. </source>
<target state="new">Wait for completion operation is not allowed when there is no active test run. </target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Loading

0 comments on commit 1868a82

Please sign in to comment.