Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Microsoft/vstest into Tar…
Browse files Browse the repository at this point in the history
…getingDifferentFrameworks
  • Loading branch information
vagisha-nidhi committed Jan 2, 2019
2 parents ce59bb3 + 31dc9fc commit d7057e2
Show file tree
Hide file tree
Showing 37 changed files with 249 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.E2ETest")]
[assembly: AssemblyTrademark("")]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.TranslationLayer.E2ETest")]
[assembly: AssemblyTrademark("")]

Expand Down
4 changes: 2 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,13 @@ function Create-NugetPackages
"TestPlatform.CLI.nuspec",
"TestPlatform.Build.nuspec",
"TestPlatform.Extensions.TrxLogger.nuspec",
"Microsoft.Net.Test.Sdk.nuspec",
"Microsoft.NET.Test.Sdk.nuspec",
"Microsoft.TestPlatform.nuspec",
"Microsoft.TestPlatform.Portable.nuspec",
"Microsoft.CodeCoverage.nuspec")

$targetFiles = @("Microsoft.CodeCoverage.targets")
$propFiles = @("Microsoft.Net.Test.Sdk.props", "Microsoft.CodeCoverage.props")
$propFiles = @("Microsoft.NET.Test.Sdk.props", "Microsoft.CodeCoverage.props")
$contentDirs = @("netcoreapp", "netfx")

# Nuget pack analysis emits warnings if binaries are packaged as content. It is intentional for the below packages.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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.Reflection;
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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Extensions.EventLogCollector")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4c1f0d81-67a9-4bf3-a006-615ab4a7fcd6")]
22 changes: 22 additions & 0 deletions src/DataCollectors/TraceDataCollector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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.Reflection;
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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.VisualStudio.TraceDataCollector")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b06e12a5-025f-42aa-8f09-c6666c65ece7")]
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Copyright (c) .NET Foundation. All rights reserved.
/>
</Target>

<Target Name="ShowInfoMessageIfProjectHasNoIsTestProjectProperty" Condition="'$(IsTestProject)' != 'true'">
<Target Name="ShowInfoMessageIfProjectHasNoIsTestProjectProperty" Condition="'$(IsTestProject)' == ''">
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="NoIsTestProjectProperty" ProjectFilePath="$(MSBuildProjectFullPath)" />
</Target>

Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.Build/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Build")]
[assembly: AssemblyTrademark("")]

Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.VisualStudio.TestPlatform.Client")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Common")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.VisualStudio.TestPlatform.CommunicationUtilities")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,20 @@ internal static Task MessageLoopAsync(
CancellationToken cancellationToken)
{
Exception error = null;
var remoteEndPoint = client.Client.RemoteEndPoint?.ToString();
var localEndPoint = client.Client.LocalEndPoint?.ToString();

var remoteEndPoint = string.Empty;
var localEndPoint = string.Empty;
try
{
remoteEndPoint = client.Client.RemoteEndPoint?.ToString();
localEndPoint = client.Client.LocalEndPoint?.ToString();
}
catch (SocketException socketException)
{
EqtTrace.Error(
"TcpClientExtensions.MessageLoopAsync: Failed to access the endpoint due to socket error: {0}",
socketException);
}

// Set read timeout to avoid blocking receive raw message
while (channel != null && !cancellationToken.IsCancellationRequested)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.CoreUtilities")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.VisualStudio.TestPlatform.CrossPlatEngine")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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.Reflection;
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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Extensions.BlameDataCollector")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("716373d6-9162-4ac6-9ae7-b5a3a4286808")]
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private static string FormatDateTimeForRunName(DateTime timeStamp)
{
// We use custom format string to make sure that runs are sorted in the same way on all intl machines.
// This is both for directory names and for Data Warehouse.
return timeStamp.ToString("yyyy-MM-dd HH:mm:ss", DateTimeFormatInfo.InvariantInfo);
return timeStamp.ToString("yyyy-MM-dd HH:mm:ss:fff", DateTimeFormatInfo.InvariantInfo);
}

private void Initialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Extensions.TrxLogger")]
[assembly: AssemblyTrademark("")]

Expand Down
16 changes: 6 additions & 10 deletions src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,13 @@ private void HandleSkippedTest(ObjectModel.TestResult rsTestResult)

private void DeriveTrxFilePath()
{
if (this.parametersDictionary != null)
if (this.parametersDictionary != null &&
this.parametersDictionary.TryGetValue(TrxLoggerConstants.LogFileNameKey, out string logFileNameValue) &&
!string.IsNullOrWhiteSpace(logFileNameValue))
{
var isLogFileNameParameterExists = this.parametersDictionary.TryGetValue(TrxLoggerConstants.LogFileNameKey, out string logFileNameValue);
if (isLogFileNameParameterExists && !string.IsNullOrWhiteSpace(logFileNameValue))
{
this.trxFilePath = Path.Combine(this.testResultsDirPath, logFileNameValue);
}
else
{
this.SetDefaultTrxFilePath();
}
string logFileNameWithoutExt = Path.GetFileNameWithoutExtension(logFileNameValue);
logFileNameValue = logFileNameValue.Replace(logFileNameWithoutExt, logFileNameWithoutExt + DateTime.Now.ToString("_yyyy-MM-dd_HH-mm-ss-fff", DateTimeFormatInfo.InvariantInfo));
this.trxFilePath = Path.Combine(this.testResultsDirPath, logFileNameValue);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatfrom.ObjectModel")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 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.Reflection;
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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.PlatformAbstractions")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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.Reflection;
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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.TestHostRuntimeProvider")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("83693884-04ee-4083-bae1-e7827b8f5fbc")]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.Utilities")]
[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.Utilities/XmlUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ internal static void AppendOrModifyChild(
#if NET451
var secureInnerXml = SecurityElement.Escape(innerXml);
#else
var secureInnerXml = innerXml;
// fixing manually as we currently target to netcore 1.1 and we don't have default implementation for Escape functionality
var secureInnerXml = string.IsNullOrEmpty(innerXml) ? innerXml : innerXml.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;").Replace("\"", "&quot;").Replace("'", "&apos;");
#endif
if (childNode == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("Microsoft.TestPlatform.ManagedConsoleWrapper")]
[assembly: AssemblyTrademark("")]

Expand Down
3 changes: 2 additions & 1 deletion src/SettingsMigrator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("SettingsMigrator")]
[assembly: AssemblyTrademark("")]

Expand Down
3 changes: 2 additions & 1 deletion src/datacollector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyProduct("datacollector")]
[assembly: AssemblyTrademark("")]

Expand Down
4 changes: 2 additions & 2 deletions src/package/nuspec/Microsoft.NET.Test.Sdk.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
</metadata>
<files>
<file src="netcoreapp\*" target="build\netcoreapp1.0\" />
<file src="netfx\*" target="build\net45\" />
<file src="netfx\*" target="build\net40\" />

<file src="Microsoft.NET.Test.Sdk.props" target="buildMultiTargeting\" />
<file src="Microsoft.NET.Test.Sdk.props" target="build\netcoreapp1.0\" />
<file src="Microsoft.NET.Test.Sdk.props" target="build\net45\" />
<file src="Microsoft.NET.Test.Sdk.props" target="build\net40\" />
<file src="Microsoft.NET.Test.Sdk.props" target="build\uap10.0\" />

</files>
Expand Down
2 changes: 1 addition & 1 deletion src/package/nuspec/TestPlatform.ObjectModel.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<tags>vstest visual-studio unittest testplatform mstest microsoft test testing</tags>
<dependencies>
<group targetFramework="net451">
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="[4.3.0, )" />
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="[4.1.0, )" />
<dependency id="System.Reflection.Metadata" version="[1.3.0, )" />
</group>
<group targetFramework="netstandard1.5">
Expand Down
Loading

0 comments on commit d7057e2

Please sign in to comment.