Skip to content

Commit

Permalink
Merge branch 'master' into pipelinePR
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishkk authored Nov 21, 2018
2 parents 69048d4 + ed25c64 commit 053840c
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 42 deletions.

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

Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Spuštění testu pro projekt {0} se přeskočí. Pokud chcete spustit testy s testem dotnet, přidejte do souboru projektu vlastnost &lt;IsTestProject&gt;true&lt;IsTestProject&gt;.</target>
<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="translated">Spuštění testu pro projekt {0} se přeskočí. Pokud chcete spustit testy s testem dotnet, přidejte do souboru projektu vlastnost &lt;IsTestProject&gt;true&lt;/IsTestProject&gt;.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Die Testausführung für das Projekt "{0}" wird übersprungen. Um Tests mit "dotnet test" auszuführen, fügen Sie der Projektdatei die Eigenschaft "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" hinzu.</target>
<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="translated">Die Testausführung für das Projekt "{0}" wird übersprungen. Um Tests mit "dotnet test" auszuführen, fügen Sie der Projektdatei die Eigenschaft "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" hinzu.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Omitiendo la ejecución de la prueba para el proyecto {0}. Para ejecutar pruebas con la prueba dotnet, agregue la propiedad "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" al archivo de proyecto.</target>
<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="translated">Omitiendo la ejecución de la prueba para el proyecto {0}. Para ejecutar pruebas con la prueba dotnet, agregue la propiedad "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" al archivo de proyecto.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">L’exécution du test pour le projet {0} est ignorée. Pour exécuter les tests avec dotnet test, ajoutez la propriété "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" au fichier projet.</target>
<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="translated">L’exécution du test pour le projet {0} est ignorée. Pour exécuter les tests avec dotnet test, ajoutez la propriété "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" au fichier projet.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">L'esecuzione del test per il progetto {0} verrà ignorata. Per eseguire test con dotnet, aggiungere la proprietà "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" al file di progetto.</target>
<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="translated">L'esecuzione del test per il progetto {0} verrà ignorata. Per eseguire test con dotnet, aggiungere la proprietà "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" al file di progetto.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">プロジェクト {0} のテストの実行をスキップしています。dotnet test を使用してテストを実行するには、プロジェクト ファイルに "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" プロパティを追加します。</target>
<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="translated">プロジェクト {0} のテストの実行をスキップしています。dotnet test を使用してテストを実行するには、プロジェクト ファイルに "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" プロパティを追加します。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">프로젝트 {0}의 테스트 실행을 건너뜁니다. dotnet test로 테스트를 실행하려면 "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" 속성을 프로젝트 파일에 추가하세요.</target>
<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="translated">프로젝트 {0}의 테스트 실행을 건너뜁니다. dotnet test로 테스트를 실행하려면 "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" 속성을 프로젝트 파일에 추가하세요.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Pomijanie uruchamiania testu dla projektu {0}. Aby uruchomić testy za pomocą polecenia dotnet test, dodaj właściwość „&lt;IsTestProject&gt;true&lt;IsTestProject&gt;” do pliku projektu.</target>
<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="translated">Pomijanie uruchamiania testu dla projektu {0}. Aby uruchomić testy za pomocą polecenia dotnet test, dodaj właściwość „&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;” do pliku projektu.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Ignorando a execução de teste do projeto {0}. Para executar testes com dotnet test, adicione a propriedade "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" ao arquivo de projeto.</target>
<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="translated">Ignorando a execução de teste do projeto {0}. Para executar testes com dotnet test, adicione a propriedade "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" ao arquivo de projeto.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">Пропуск выполнения теста для проекта {0}. Чтобы выполнить тесты с тестом dotnet, добавьте свойство "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" в файл проекта.</target>
<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="translated">Пропуск выполнения теста для проекта {0}. Чтобы выполнить тесты с тестом dotnet, добавьте свойство "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" в файл проекта.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">{0} projesi için test çalıştırması atlanıyor. Dotnet test ile testleri çalıştırmak için proje dosyasına "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" özelliğini ekleyin.</target>
<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="translated">{0} projesi için test çalıştırması atlanıyor. Dotnet test ile testleri çalıştırmak için proje dosyasına "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" özelliğini ekleyin.</target>
<note />
</trans-unit>
</body>
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.TestPlatform.Build/Resources/xlf/Resources.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<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>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">不对项目 {0} 运行测试。要运行带 dotnet 测试的测试,请向项目文件添加 "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;"。</target>
<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="translated">不对项目 {0} 运行测试。要运行带 dotnet 测试的测试,请向项目文件添加 "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;"。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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="translated">即將跳過為專案 {0} 執行測試。若要使用 dotnet 測試來執行測試,請在專案檔中新增 "&lt;IsTestProject&gt;true&lt;IsTestProject&gt;" 屬性。</target>
<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="translated">即將跳過為專案 {0} 執行測試。若要使用 dotnet 測試來執行測試,請在專案檔中新增 "&lt;IsTestProject&gt;true&lt;/IsTestProject&gt;" 屬性。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;

using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces;
using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Helpers;
using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing;
using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.Interfaces;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces;
using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions;
using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces;
using CommunicationUtilitiesResources = Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Resources.Resources;
using CoreUtilitiesConstants = Microsoft.VisualStudio.TestPlatform.CoreUtilities.Constants;

/// <summary>
/// An implementation of <see cref="IVsTestConsoleWrapper"/> to invoke test operations
Expand All @@ -28,6 +34,8 @@ public class VsTestConsoleWrapper : IVsTestConsoleWrapper

private readonly ITranslationLayerRequestSender requestSender;

private readonly IProcessHelper processHelper;

private bool sessionStarted;

/// <summary>
Expand Down Expand Up @@ -63,7 +71,7 @@ public VsTestConsoleWrapper(string vstestConsolePath) :
/// <param name="vstestConsolePath">Path to the test runner <c>vstest.console.exe</c>.</param>
/// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
public VsTestConsoleWrapper(string vstestConsolePath, ConsoleParameters consoleParameters) :
this(new VsTestConsoleRequestSender(), new VsTestConsoleProcessManager(vstestConsolePath), consoleParameters, TestPlatformEventSource.Instance)
this(new VsTestConsoleRequestSender(), new VsTestConsoleProcessManager(vstestConsolePath), consoleParameters, TestPlatformEventSource.Instance, new ProcessHelper())
{
}

Expand All @@ -74,12 +82,14 @@ public VsTestConsoleWrapper(string vstestConsolePath, ConsoleParameters consoleP
/// <param name="processManager">Process manager.</param>
/// <param name="consoleParameters">The parameters to be passed onto the runner process</param>
/// <param name="testPlatformEventSource">Performance event source</param>
internal VsTestConsoleWrapper(ITranslationLayerRequestSender requestSender, IProcessManager processManager, ConsoleParameters consoleParameters, ITestPlatformEventSource testPlatformEventSource)
/// <param name="processHelper">Helper for process related utilities</param>
internal VsTestConsoleWrapper(ITranslationLayerRequestSender requestSender, IProcessManager processManager, ConsoleParameters consoleParameters, ITestPlatformEventSource testPlatformEventSource, IProcessHelper processHelper)
{
this.requestSender = requestSender;
this.vstestConsoleProcessManager = processManager;
this.consoleParameters = consoleParameters;
this.testPlatformEventSource = testPlatformEventSource;
this.processHelper = processHelper;
this.pathToAdditionalExtensions = new List<string>();

this.vstestConsoleProcessManager.ProcessExited += (sender, args) => this.requestSender.OnProcessExited();
Expand Down Expand Up @@ -263,20 +273,29 @@ private void EnsureInitialized()
EqtTrace.Info("VsTestConsoleWrapper.EnsureInitialized: Process Started.");
this.sessionStarted = this.WaitForConnection();
}

if (!this.sessionStarted)
{
throw new TransationLayerException("Error connecting to Vstest Command Line");
}
}

private bool WaitForConnection()
{
EqtTrace.Info("VsTestConsoleWrapper.WaitForConnection: Waiting for connection to command line runner.");
var connected = this.requestSender.WaitForRequestHandlerConnection(ConnectionTimeout);
this.testPlatformEventSource.TranslationLayerInitializeStop();

return connected;
var timeout = EnvironmentHelper.GetConnectionTimeout();
if (!this.requestSender.WaitForRequestHandlerConnection(timeout * 1000))
{
var processName = this.processHelper.GetCurrentProcessFileName();
throw new TransationLayerException(
string.Format(
CultureInfo.CurrentUICulture,
CommunicationUtilitiesResources.ConnectionTimeoutErrorMessage,
processName,
CoreUtilitiesConstants.VstestConsoleProcessName,
timeout,
EnvironmentHelper.VstestConnectionTimeout)
);
}

this.testPlatformEventSource.TranslationLayerInitializeStop();
return true;
}
}
}
Loading

0 comments on commit 053840c

Please sign in to comment.