Skip to content

Commit

Permalink
Port from master to 15.9 (#1781)
Browse files Browse the repository at this point in the history
* Verify NS.JSon is loaded appropriately in case of DisableAppDomain (#1740)

* reverting back app domain culture setup

* binding redirect for TW.Interfaces

* Run net451 test for Newtonsoft dependency

(cherry picked from commit 3cbab0b)

* Run tests only for test projects (#1745)


(cherry picked from commit a2b4196)

* Upgrading the version of VSSDK Build tools nuget, because the older one is incompatible with the latest VSSDK. (#1761)


(cherry picked from commit d391224)

* Added linkes to all RFCs (#1743)

Added links to all RFCs to address #1392.

* refined link test to .NET Core CC RFC.

* Update README.md

(cherry picked from commit 4d89670)

* Get latest extensions from VS d15.9stg branch (#1771)


(cherry picked from commit d5c4415)

* Add info log if try to run tests with no IsTestProject prop (#1778)

* Add info log if try to run tests with no IsTestProject prop

* Add message to resources

* invert check

(cherry picked from commit 3decca0)
  • Loading branch information
smadala authored Oct 8, 2018
1 parent 8482205 commit adbf6bf
Show file tree
Hide file tree
Showing 27 changed files with 229 additions and 20 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ There are many ways to contribute to VSTest
- [Data collection Protocol](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0006-DataCollection-Protocol.md)
- [Translation Layer](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0008-TranslationLayer.md)
- [Editors API Revision Update](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0009-Editors-API-RevisionUpdate.md)
- [TranslationLayer](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0008-TranslationLayer.md)
- [Source Information For Discovered Tests](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0010-Source-Information-For-Discovered-Tests.md)
- [Test Session Timeout](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0011-Test-Session-Timeout.md)
- [Test Adapter Lookup](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0013-Test-Adapter-Lookup.md)
- [Packaging](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0014-Packaging.md)
- [Telemetry](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0015-Telemetry.md)
- [Loggers Information From RunSettings](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0016-Loggers-Information-From-RunSettings.md)
- [TestCase FullyQualifiedName](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0017-TestCase-FullyQualifiedName.md)
- [Skip Default Adapters](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0018-Skip-Default-Adapters.md)
- [Disable Appdomain While Running Tests](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0019-Disable-Appdomain-While-Running-Tests.md)
- [Improving Logic To Pass Sources To Adapters](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0020-Improving-Logic-To-Pass-Sources-To-Adapters.md)
- [Code Coverage for .Net Core](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0021-CodeCoverageForNetCore.md)
- [User Specified TestAdapter Lookup](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0022-User-Specified-TestAdapter-Lookup.md)
- [TestSettings Deprecation](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0023-TestSettings-Deprecation.md)
- [Blame Collector Options](https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0024-Blame-Collector-Options.md)

### Building
VSTest can be built from within Visual Studio or from the CLI.
Expand All @@ -41,4 +56,4 @@ VSTest platform is licensed under the [MIT license](https://github.com/Microsoft
Please see [issue tracking](https://github.com/Microsoft/vstest-docs/blob/master/issuetracking.md) for a description of the workflow we use to process issues.

### Roadmap
For information on shipped and upcoming features please refer to our [Releases Roadmap](https://github.com/Microsoft/vstest-docs/blob/master/docs/releases.md).
For information on shipped and upcoming features please refer to our [Releases Roadmap](https://github.com/Microsoft/vstest-docs/blob/master/docs/releases.md).
2 changes: 1 addition & 1 deletion scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function Publish-Package
Copy-PackageItems "Microsoft.TestPlatform.Build"

# Copy IntelliTrace components.
$intellitraceSourceDirectory = Join-Path $env:TP_PACKAGES_DIR "Microsoft.Internal.Intellitrace\15.8.0-preview-20180702-05\tools"
$intellitraceSourceDirectory = Join-Path $env:TP_PACKAGES_DIR "Microsoft.Internal.Intellitrace\15.9.0-preview-20180924-02\tools"
$intellitraceTargetDirectory = Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Intellitrace"

if (-not (Test-Path $intellitraceTargetDirectory)) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/TestPlatform.Dependencies.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VSSdkBuildToolsVersion>15.0.26201</VSSdkBuildToolsVersion>
<VSSdkBuildToolsVersion>15.8.3247</VSSdkBuildToolsVersion>

<!-- Name of the elements must be in sync with test\Microsoft.TestPlatform.TestUtilities\IntegrationTestBase.cs -->
<NETTestSdkPreviousVersion>15.5.0</NETTestSdkPreviousVersion>
Expand All @@ -22,7 +22,7 @@

<JsonNetVersion>9.0.1</JsonNetVersion>
<MoqVersion>4.7.63</MoqVersion>
<TestPlatformExternalsVersion>15.8.0-preview-1831095</TestPlatformExternalsVersion>
<TestPlatformExternalsVersion>15.9.0-preview-2055449</TestPlatformExternalsVersion>

</PropertyGroup>
</Project>
15 changes: 10 additions & 5 deletions src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ Copyright (c) .NET Foundation. All rights reserved.
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.VSTestTask" AssemblyFile="$(VSTestTaskAssemblyFile)" />
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.BuildLogTask" AssemblyFile="$(VSTestTaskAssemblyFile)" />
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask" AssemblyFile="$(VSTestTaskAssemblyFile)" />

<!--
============================================================
Test target
Main entry point for running tests through vstest.console.exe
============================================================
-->
<Target Name="VSTest" >
<CallTarget Condition="'$(VSTestNoBuild)' != 'true'" Targets="BuildProject" />
<Target Name="VSTest" DependsOnTargets="ShowInfoMessageIfProjectHasNoIsTestProjectProperty">
<CallTarget Condition="'$(VSTestNoBuild)' != 'true' AND '$(IsTestProject)' == 'true'" Targets="BuildProject" />

<CallTarget Targets="ShowCallOfVSTestTaskWithParameter" />

Expand All @@ -48,15 +48,20 @@ Copyright (c) .NET Foundation. All rights reserved.
VSTestBlame="$(VSTestBlame)"
VSTestTraceDataCollectorDirectoryPath="$(TraceDataCollectorDirectoryPath)"
VSTestNoLogo="$(VSTestNoLogo)"
Condition="'$(IsTestProject)' == 'true'"
/>
</Target>

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

<Target Name="BuildProject">
<CallTarget Targets="ShowMsbuildWithParameter" />

<Microsoft.TestPlatform.Build.Tasks.BuildLogTask BuildStarted="True" />
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="BuildStarted" />
<MSBuild Projects ="$(MSBuildProjectFullPath)" />
<Microsoft.TestPlatform.Build.Tasks.BuildLogTask />
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="BuildCompleted" />

<Message Text="Done Building project $(MSBuildProjectFullPath) for TargetFramework=$(TargetFramework)" Importance="low" />
</Target>
Expand Down
11 changes: 10 additions & 1 deletion src/Microsoft.TestPlatform.Build/Resources/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions src/Microsoft.TestPlatform.Build/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
<data name="BuildStarted" xml:space="preserve">
<value>Build started, please wait...</value>
</data>
<data name="NoIsTestProjectProperty" xml:space="preserve">
<value>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</value>
</data>
<data name="TestRunningSummary" xml:space="preserve">
<value>Test run for {0}({1})</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Upozornění: Aktualizujte odkaz na balíček Microsoft.NET.Test.Sdk na verzi 15.8.0 nebo novější, aby se získalo pokrytí kódu.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Warnung: Aktualisieren Sie die Microsoft.NET.Test.Sdk-Paketreferenz auf Version 15.8.0 oder höher, um von Code Coverage zu profitieren.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Advertencia: Actualice la referencia del paquete Microsoft.NET.Test.Sdk a la versión 15.8.0 o posterior para recopilar la cobertura de código.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Avertissement : mettez à jour la référence de package Microsoft.NET.Test.Sdk vers la version 15.8.0 ou ultérieure pour collecter la couverture du code.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Avviso: per raccogliere i dati di code coverage, aggiornare il riferimento al pacchetto Microsoft.NET.Test.Sdk alla versione 15.8.0 o successiva.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">警告: コード カバレッジを収集するには、Microsoft.NET.Test.Sdk パッケージ参照をバージョン 15.8.0 以降に更新してください。</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">경고: 코드 검사를 수집하려면 Microsoft.NET.Test.Sdk 패키지 참조를 버전 15.8.0 이상으로 업데이트하세요.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Ostrzeżenie: zaktualizuj odwołanie do pakietu Microsoft.NET.Test.Sdk do wersji 15.8.0 lub nowszej w celu zbierania danych dotyczących pokrycia kodu.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Aviso: Atualize a referência do pacote Microsoft.NET.Test.Sdk para a versão 15.8.0 ou posterior para coletar a cobertura do código.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Внимание. Для сбора данных об объеме протестированного кода обновите пакет Microsoft.NET.Test.Sdk по ссылке как минимум до версии 15.8.0.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">Uyarı: Kod kapsamını toplamak için Microsoft.NET.Test.Sdk paketinin başvurusunu 15.8.0 veya üzeri bir sürüme güncelleştirin.</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
5 changes: 5 additions & 0 deletions src/Microsoft.TestPlatform.Build/Resources/xlf/Resources.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<target state="new">To collect code coverage update Microsoft.NET.Test.Sdk package version to latest.</target>
<note></note>
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">警告: 将 Microsoft.NET.Test.Sdk 包引用更新为版本 15.8.0 或更高版本,以便收集代码覆盖率。</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<target state="translated">警告: 將 Microsoft.NET.Test.Sdk 套件參考更新至版本 15.8.0 或更新版本,才可收集程式碼涵蓋範圍。</target>
<note />
</trans-unit>
<trans-unit id="NoIsTestProjectProperty">
<source>Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</source>
<target state="new">Skipping running test for project {0}. To run tests with dotnet test add "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" property to project file.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,40 @@ namespace Microsoft.TestPlatform.Build.Tasks
using Microsoft.Build.Utilities;
using Microsoft.TestPlatform.Build.Resources;

public class BuildLogTask : Task
public class VSTestLogsTask : Task
{
public bool BuildStarted
public string LogType
{
get;
set;
}

public string ProjectFilePath
{
get;
set;
}

public override bool Execute()
{
if (BuildStarted)
if (string.Equals(LogType, "BuildStarted", StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine(Resources.BuildStarted);
}
else
else if (string.Equals(LogType, "BuildCompleted", StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine(Resources.BuildCompleted);
Console.WriteLine();
}
else if (string.Equals(LogType, "NoIsTestProjectProperty", StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine(Resources.NoIsTestProjectProperty, ProjectFilePath);
}
else
{
return false;
}

return true;
}
}
Expand Down
Loading

0 comments on commit adbf6bf

Please sign in to comment.