From 3117687421cfc5b6bfebba5f93b7f52d6513d493 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Wed, 14 Nov 2018 14:27:57 +0530 Subject: [PATCH 01/18] Adding the YAML file for PR --- azure-pipelines.yml | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..37c12b531d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,50 @@ +# Pipeline YAML for PR + +resources: +- repo: self + clean: true +queue: + name: VSEng-MicroBuildVS2017 + demands: + - DotNetFramework + - Cmd + - msbuild + - visualstudio + +variables: + BuildConfiguration: 'release' + BuildTargetRuntime: 'win7-x64' +steps: + +- task: BatchScript@1 + displayName: 'Run script build.cmd' + inputs: + filename: build.cmd + arguments: '-verbose -configuration release' + modifyEnvironment: false + failOnStandardError: true + + +- task: CmdLine@1 + displayName: 'Delete stale pdb files' + inputs: + filename: del + arguments: '/S /F *.pdb' + workingFolder: '$(SystemRoot)' + continueOnError: true + condition: always() + +- task: BatchScript@1 + displayName: 'Run script test.cmd' + inputs: + filename: test.cmd + arguments: '-verbose -configuration $(BuildConfiguration)' + modifyEnvironment: false + failOnStandardError: true + +- task: PublishTestResults@2 + displayName: 'Publish Test Results **\*.trx' + inputs: + testResultsFormat: VSTest + testResultsFiles: '**\*.trx' + condition: succeededOrFailed() \ No newline at end of file From a4ce69af7567cbe904b8b8e06ec7ee44754107ac Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Wed, 14 Nov 2018 14:31:34 +0530 Subject: [PATCH 02/18] Removed redundant lines. --- azure-pipelines.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 37c12b531d..005f5fd8e0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,9 +11,6 @@ queue: - msbuild - visualstudio -variables: - BuildConfiguration: 'release' - BuildTargetRuntime: 'win7-x64' steps: - task: BatchScript@1 @@ -24,7 +21,6 @@ steps: modifyEnvironment: false failOnStandardError: true - - task: CmdLine@1 displayName: 'Delete stale pdb files' inputs: @@ -47,4 +43,5 @@ steps: inputs: testResultsFormat: VSTest testResultsFiles: '**\*.trx' - condition: succeededOrFailed() \ No newline at end of file + condition: succeededOrFailed() + \ No newline at end of file From 973c3c2e4222e697b6175815ea283844300813bd Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 14:53:01 +0530 Subject: [PATCH 03/18] Acceptance tests and adding changes for Ubuntu --- azure-pipelines.yml | 117 +++++++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 44 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 005f5fd8e0..30427008d1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,47 +1,76 @@ # Pipeline YAML for PR -resources: -- repo: self - clean: true -queue: - name: VSEng-MicroBuildVS2017 - demands: - - DotNetFramework - - Cmd - - msbuild - - visualstudio +jobs: +- job: Windows + resources: + - repo: self + clean: true + queue: + name: VSEng-MicroBuildVS2017 + demands: + - DotNetFramework + - Cmd + - msbuild + - visualstudio + variables: + buildConfiguration: 'release' + steps: + - task: BatchScript@1 + displayName: 'Run script build.cmd' + inputs: + filename: build.cmd + arguments: '-verbose -configuration $(buildConfiguration)' + modifyEnvironment: false + failOnStandardError: true -steps: - -- task: BatchScript@1 - displayName: 'Run script build.cmd' - inputs: - filename: build.cmd - arguments: '-verbose -configuration release' - modifyEnvironment: false - failOnStandardError: true - -- task: CmdLine@1 - displayName: 'Delete stale pdb files' - inputs: - filename: del - arguments: '/S /F *.pdb' - workingFolder: '$(SystemRoot)' - continueOnError: true - condition: always() - -- task: BatchScript@1 - displayName: 'Run script test.cmd' - inputs: - filename: test.cmd - arguments: '-verbose -configuration $(BuildConfiguration)' - modifyEnvironment: false - failOnStandardError: true - -- task: PublishTestResults@2 - displayName: 'Publish Test Results **\*.trx' - inputs: - testResultsFormat: VSTest - testResultsFiles: '**\*.trx' - condition: succeededOrFailed() - \ No newline at end of file + - task: BatchScript@1 + displayName: 'Run script test.cmd' + inputs: + filename: test.cmd + arguments: '-verbose -configuration $(buildConfiguration)' + modifyEnvironment: false + failOnStandardError: true + + - task: BatchScript@1 + displayName: 'Run Acceptance Tests' + inputs: + filename: test.cmd + arguments: '-verbose -configuration $(buildConfiguration) -p AcceptanceTests -v -f net451' + modifyEnvironment: false + failOnStandardError: true + + - task: BatchScript@1 + displayName: 'Run Platform Tests' + inputs: + filename: test.cmd + arguments: '-verbose -configuration $(buildConfiguration) -p platformtests' + modifyEnvironment: false + failOnStandardError: true + + - task: BatchScript@1 + displayName: 'Run Smoke Tests' + inputs: + filename: test.cmd + arguments: '-verbose -configuration $(buildConfiguration) -p smoke' + modifyEnvironment: false + failOnStandardError: true + + - task: PublishTestResults@2 + displayName: 'Publish Test Results **\*.trx' + inputs: + testResultsFormat: VSTest + testResultsFiles: '**\*.trx' + condition: succeededOrFailed() + +- job: Linux + pools: + vmImage: 'ubuntu-16.04' + variables: + buildConfiguration: 'Release' + steps: + - script: sh ./build.sh -c $(buildConfiguration) + displayName: 'sh ./build.sh -c $(buildConfiguration)' + - script: sh ./test.sh -c $(buildConfiguration) + displayName: 'sh ./test.sh -c $(buildConfiguration)' + - task: PublishTestResults@2 + From 2e111a335df58906db1816f3c567e43fd6ceaa50 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 14:56:28 +0530 Subject: [PATCH 04/18] Fixed the spacing --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 30427008d1..82748e18eb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -69,8 +69,8 @@ jobs: buildConfiguration: 'Release' steps: - script: sh ./build.sh -c $(buildConfiguration) - displayName: 'sh ./build.sh -c $(buildConfiguration)' + displayName: 'sh ./build.sh -c $(buildConfiguration)' - script: sh ./test.sh -c $(buildConfiguration) - displayName: 'sh ./test.sh -c $(buildConfiguration)' + displayName: 'sh ./test.sh -c $(buildConfiguration)' - task: PublishTestResults@2 From 0dc411a73fd8c824b5e938b92f358108a04ac6bc Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:02:58 +0530 Subject: [PATCH 05/18] Removed redundant fields --- azure-pipelines.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 82748e18eb..b42f81ab27 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,10 +2,7 @@ jobs: - job: Windows - resources: - - repo: self - clean: true - queue: + pool: name: VSEng-MicroBuildVS2017 demands: - DotNetFramework @@ -63,8 +60,8 @@ jobs: condition: succeededOrFailed() - job: Linux - pools: - vmImage: 'ubuntu-16.04' + pool: + vmImage: 'ubuntu-16.04' variables: buildConfiguration: 'Release' steps: From c0d16c916253916df5b9504bfe0f3ad9cea7fb52 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:06:02 +0530 Subject: [PATCH 06/18] Updating the Ubuntu scripts --- azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b42f81ab27..db533fa98a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,7 @@ jobs: failOnStandardError: true - task: BatchScript@1 - displayName: 'Run script test.cmd' + displayName: 'Run Unit Tests' inputs: filename: test.cmd arguments: '-verbose -configuration $(buildConfiguration)' @@ -65,9 +65,9 @@ jobs: variables: buildConfiguration: 'Release' steps: - - script: sh ./build.sh -c $(buildConfiguration) - displayName: 'sh ./build.sh -c $(buildConfiguration)' - - script: sh ./test.sh -c $(buildConfiguration) - displayName: 'sh ./test.sh -c $(buildConfiguration)' + - script: ./build.sh -c $(buildConfiguration) + displayName: './build.sh -c $(buildConfiguration)' + - script: ./test.sh -c $(buildConfiguration) + displayName: './test.sh -c $(buildConfiguration)' - task: PublishTestResults@2 From 7e9ce8212ab460c9878070207854eb781db783f5 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:15:44 +0530 Subject: [PATCH 07/18] Testing Test.sh --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index db533fa98a..36acfc1a09 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ jobs: - msbuild - visualstudio variables: - buildConfiguration: 'release' + buildConfiguration: 'debug' steps: - task: BatchScript@1 displayName: 'Run script build.cmd' From 01e4bd0ec70bb215ffc001b96e9e4f5d86de1ddf Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:17:25 +0530 Subject: [PATCH 08/18] Removed redundant "-v" --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 36acfc1a09..f467ca9095 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,7 +32,7 @@ jobs: displayName: 'Run Acceptance Tests' inputs: filename: test.cmd - arguments: '-verbose -configuration $(buildConfiguration) -p AcceptanceTests -v -f net451' + arguments: '-verbose -configuration $(buildConfiguration) -p AcceptanceTests -f net451' modifyEnvironment: false failOnStandardError: true From 49b1ee2e4b7acce9ec043243b690db7d00e589f7 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:18:46 +0530 Subject: [PATCH 09/18] Debug Test.sh for Ubuntu --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f467ca9095..ac7e9adbfd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ jobs: - msbuild - visualstudio variables: - buildConfiguration: 'debug' + buildConfiguration: 'release' steps: - task: BatchScript@1 displayName: 'Run script build.cmd' @@ -63,7 +63,7 @@ jobs: pool: vmImage: 'ubuntu-16.04' variables: - buildConfiguration: 'Release' + buildConfiguration: 'debug' steps: - script: ./build.sh -c $(buildConfiguration) displayName: './build.sh -c $(buildConfiguration)' From a78dbbbc393c45694663ccaa2b22c071e9957013 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:56:45 +0530 Subject: [PATCH 10/18] Updating the shell script --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 24f83d7ae1..d4a7b3f0bf 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -18,7 +18,6 @@ CONFIGURATION="Debug" TARGET_RUNTIME="ubuntu.16.04-x64" FAIL_FAST=false VERBOSE=false -PROJECT_NAME_PATTERNS=**Unit*bin*Debug*netcoreapp1.0*UnitTests*dll while [ $# -gt 0 ]; do lowerI="$(echo ${1:-} | awk '{print tolower($0)}')" @@ -49,6 +48,7 @@ done # # Variables # +PROJECT_NAME_PATTERNS=**Unit*bin*$CONFIGURATION*netcoreapp1.0*UnitTests*dll TP_ROOT_DIR=$(cd "$(dirname "$0")"; pwd -P) TP_TOOLS_DIR="$TP_ROOT_DIR/tools" TP_PACKAGES_DIR="$TP_ROOT_DIR/packages" From d6001d94f7137af9eca6667c046abfcb2cf85b77 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 15:57:27 +0530 Subject: [PATCH 11/18] Testing release for shell scripts on Ubuntu --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ac7e9adbfd..b097044769 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,7 +63,7 @@ jobs: pool: vmImage: 'ubuntu-16.04' variables: - buildConfiguration: 'debug' + buildConfiguration: 'release' steps: - script: ./build.sh -c $(buildConfiguration) displayName: './build.sh -c $(buildConfiguration)' From 53969d43e92d3d2da8aa7fea9f644332c14ab74e Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 17:43:48 +0530 Subject: [PATCH 12/18] Case sensitivity for build configuration --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b097044769..9070e4a5b7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ jobs: - msbuild - visualstudio variables: - buildConfiguration: 'release' + buildConfiguration: 'Release' steps: - task: BatchScript@1 displayName: 'Run script build.cmd' @@ -63,7 +63,7 @@ jobs: pool: vmImage: 'ubuntu-16.04' variables: - buildConfiguration: 'release' + buildConfiguration: 'Release' steps: - script: ./build.sh -c $(buildConfiguration) displayName: './build.sh -c $(buildConfiguration)' From c587748566531fee1f88ffe84e549f83de7d2718 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Mon, 19 Nov 2018 18:28:12 +0530 Subject: [PATCH 13/18] Removing the test for Ubuntu for now. --- azure-pipelines.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9070e4a5b7..e291c88b5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,15 @@ jobs: modifyEnvironment: false failOnStandardError: true + - task: CmdLine@1 + displayName: 'Delete stale pdb files' + inputs: + filename: del + arguments: '/S /F *.pdb' + workingFolder: '$(SystemRoot)' + continueOnError: true + condition: always() + - task: BatchScript@1 displayName: 'Run Unit Tests' inputs: @@ -67,7 +76,4 @@ jobs: steps: - script: ./build.sh -c $(buildConfiguration) displayName: './build.sh -c $(buildConfiguration)' - - script: ./test.sh -c $(buildConfiguration) - displayName: './test.sh -c $(buildConfiguration)' - - task: PublishTestResults@2 - + From 832a5af69b1628de451f5822262ee9feba14eb72 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Tue, 20 Nov 2018 12:28:30 +0530 Subject: [PATCH 14/18] Trying on hosted agents for Windows as well. --- azure-pipelines.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e291c88b5d..d77a6dfb7f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,12 +3,7 @@ jobs: - job: Windows pool: - name: VSEng-MicroBuildVS2017 - demands: - - DotNetFramework - - Cmd - - msbuild - - visualstudio + vmImage: 'vs2017-win2016' variables: buildConfiguration: 'Release' steps: From 78bc7c8aeb0b3032b69f0c1b7b5515fbbd684618 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Tue, 20 Nov 2018 16:18:47 +0530 Subject: [PATCH 15/18] Fixing flaky console logger tests. --- .../Internal/ConsoleLoggerTests.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/vstest.console.UnitTests/Internal/ConsoleLoggerTests.cs b/test/vstest.console.UnitTests/Internal/ConsoleLoggerTests.cs index 2fe8ac1ab0..af70fec47b 100644 --- a/test/vstest.console.UnitTests/Internal/ConsoleLoggerTests.cs +++ b/test/vstest.console.UnitTests/Internal/ConsoleLoggerTests.cs @@ -144,7 +144,8 @@ public void TestMessageHandlerShouldWriteToConsoleWhenTestRunMessageIsRaised() loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Informational, "Informational123")); loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Error, "Error123")); loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Warning, "Warning123")); - + loggerEvents.WaitForEventCompletion(); + // Added this for synchronization SpinWait.SpinUntil(() => count == 3, 300); @@ -163,6 +164,7 @@ public void TestMessageHandlerShouldWriteToConsoleWhenTestDiscoveryMessageIsRais loggerEvents.RaiseDiscoveryMessage(new TestRunMessageEventArgs(TestMessageLevel.Informational, "Informational123")); loggerEvents.RaiseDiscoveryMessage(new TestRunMessageEventArgs(TestMessageLevel.Error, "Error123")); loggerEvents.RaiseDiscoveryMessage(new TestRunMessageEventArgs(TestMessageLevel.Warning, "Warning123")); + loggerEvents.WaitForEventCompletion(); // Added this for synchronization SpinWait.SpinUntil(() => count == 3, 300); @@ -223,6 +225,7 @@ public void TestResultHandlerShouldShowStdOutMessagesBannerIfStdOutIsNotEmpty() testresult.Messages.Add(testResultMessage); loggerEvents.RaiseTestResult(new TestResultEventArgs(testresult)); + loggerEvents.WaitForEventCompletion(); // Added this for synchronization SpinWait.SpinUntil(() => count == 2, 300); @@ -253,6 +256,7 @@ public void NormalVerbosityShowNotStdOutMessagesForPassedTests() // Raise an event on mock object loggerEvents.RaiseTestResult(new TestResultEventArgs(testresult)); + loggerEvents.WaitForEventCompletion(); // Verify this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.StdOutMessagesBanner, OutputLevel.Information), Times.Never()); @@ -308,7 +312,8 @@ public void TestRunErrorMessageShowShouldTestRunFailed() // Act. Raise an event on mock object loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Error, message)); loggerEvents.RaiseTestRunComplete(new TestRunCompleteEventArgs(new Mock().Object, false, false, null, new Collection(), TimeSpan.FromSeconds(1))); - + loggerEvents.WaitForEventCompletion(); + // Verify this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.TestRunFailed, OutputLevel.Error), Times.Once()); this.mockOutput.Verify(o => o.WriteLine(message, OutputLevel.Error), Times.Once()); @@ -331,6 +336,7 @@ public void InQuietModeTestErrorMessageShowShouldShowTestRunFailed() // Act. Raise an event on mock object loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Error, message)); loggerEvents.RaiseTestRunComplete(new TestRunCompleteEventArgs(new Mock().Object, false, false, null, new Collection(), TimeSpan.FromSeconds(1))); + loggerEvents.WaitForEventCompletion(); // Verify this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.TestRunFailed, OutputLevel.Error), Times.Once()); @@ -354,6 +360,7 @@ public void InQuietModeTestWarningMessageShouldNotShow() // Act. Raise an event on mock object loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Warning, message)); loggerEvents.RaiseTestRunComplete(new TestRunCompleteEventArgs(new Mock().Object, false, false, null, new Collection(), TimeSpan.FromSeconds(1))); + loggerEvents.WaitForEventCompletion(); // Verify this.mockOutput.Verify(o => o.WriteLine(message, OutputLevel.Warning), Times.Never()); @@ -378,6 +385,7 @@ public void InNormalModeTestWarningAndErrorMessagesShouldShow() loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Warning, message)); loggerEvents.RaiseTestRunMessage(new TestRunMessageEventArgs(TestMessageLevel.Error, errorMessage)); loggerEvents.RaiseTestRunComplete(new TestRunCompleteEventArgs(new Mock().Object, false, false, null, new Collection(), TimeSpan.FromSeconds(1))); + loggerEvents.WaitForEventCompletion(); // Verify this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.TestRunFailed, OutputLevel.Error), Times.Once()); @@ -405,6 +413,7 @@ public void TestResultHandlerShouldNotShowStdOutMessagesBannerIfStdOutIsEmpty() testresult.Messages.Add(testResultMessage); loggerEvents.RaiseTestResult(new TestResultEventArgs(testresult)); + loggerEvents.WaitForEventCompletion(); this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.StdOutMessagesBanner, OutputLevel.Information), Times.Never()); } @@ -454,6 +463,7 @@ public void TestResultHandlerShouldNotShowStdErrMessagesBannerIfStdErrIsEmpty() testresult.Messages.Add(testResultMessage); loggerEvents.RaiseTestResult(new TestResultEventArgs(testresult)); + loggerEvents.WaitForEventCompletion(); this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.StdErrMessagesBanner, OutputLevel.Information), Times.Never()); } @@ -505,6 +515,7 @@ public void TestResultHandlerShouldNotShowAdditionalInfoBannerIfAdditionalInfoIs testresult.Messages.Add(testResultMessage); loggerEvents.RaiseTestResult(new TestResultEventArgs(testresult)); + loggerEvents.WaitForEventCompletion(); this.mockOutput.Verify(o => o.WriteLine(CommandLineResources.AddnlInfoMessagesBanner, OutputLevel.Information), Times.Never()); } @@ -614,6 +625,7 @@ public void TestResultHandlerShouldWriteToNoTestResultForQuietVerbosity() { loggerEvents.RaiseTestResult(new TestResultEventArgs(testResult)); } + loggerEvents.WaitForEventCompletion(); this.mockOutput.Verify(o => o.WriteLine(string.Format(CultureInfo.CurrentCulture, CommandLineResources.PassedTestIndicator, "TestName"), OutputLevel.Information), Times.Never); this.mockOutput.Verify(o => o.WriteLine(string.Format(CultureInfo.CurrentCulture, CommandLineResources.FailedTestIndicator, "TestName"), OutputLevel.Information), Times.Never); From 74b09fe6b46e9c63690f2f2decd22a227ce1dc24 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Tue, 20 Nov 2018 22:40:12 +0530 Subject: [PATCH 16/18] Fixing the Common platform tests --- ...Microsoft.TestPlatform.Common.PlatformTests.csproj | 1 + .../Program.cs | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/Microsoft.TestPlatform.Common.PlatformTests/Program.cs diff --git a/test/Microsoft.TestPlatform.Common.PlatformTests/Microsoft.TestPlatform.Common.PlatformTests.csproj b/test/Microsoft.TestPlatform.Common.PlatformTests/Microsoft.TestPlatform.Common.PlatformTests.csproj index a60bcbe10d..ebdc931090 100644 --- a/test/Microsoft.TestPlatform.Common.PlatformTests/Microsoft.TestPlatform.Common.PlatformTests.csproj +++ b/test/Microsoft.TestPlatform.Common.PlatformTests/Microsoft.TestPlatform.Common.PlatformTests.csproj @@ -6,6 +6,7 @@ + Exe netcoreapp1.0;net451 Microsoft.TestPlatform.Common.PlatformTests true diff --git a/test/Microsoft.TestPlatform.Common.PlatformTests/Program.cs b/test/Microsoft.TestPlatform.Common.PlatformTests/Program.cs new file mode 100644 index 0000000000..c14da13e69 --- /dev/null +++ b/test/Microsoft.TestPlatform.Common.PlatformTests/Program.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft. All rights reserved. + +namespace Microsoft.VisualStudio.TestPlatform.Common.UnitTests +{ + public static class Program + { + public static void Main(string[] args) + { + } + } +} \ No newline at end of file From 69048d4643bcf294d1616130fa1e603f6be4fec9 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Wed, 21 Nov 2018 01:00:52 +0530 Subject: [PATCH 17/18] Fix for the smoke tests run. --- .../Microsoft.TestPlatform.SmokeTests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.TestPlatform.SmokeTests/Microsoft.TestPlatform.SmokeTests.csproj b/test/Microsoft.TestPlatform.SmokeTests/Microsoft.TestPlatform.SmokeTests.csproj index c6a54bb6bf..cd2568b209 100644 --- a/test/Microsoft.TestPlatform.SmokeTests/Microsoft.TestPlatform.SmokeTests.csproj +++ b/test/Microsoft.TestPlatform.SmokeTests/Microsoft.TestPlatform.SmokeTests.csproj @@ -6,9 +6,9 @@ - Exe + Exe Microsoft.TestPlatform.SmokeTests - netcoreapp1.0;net451 + netcoreapp1.0;netcoreapp2.0;net451 From 7c83b0e5176e82248dd98a7fbba2f22c7756d499 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Wed, 21 Nov 2018 14:54:49 +0530 Subject: [PATCH 18/18] Fixing the name for trx for publishing the test run --- scripts/test.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.ps1 b/scripts/test.ps1 index ebf2427592..c2058a54ac 100644 --- a/scripts/test.ps1 +++ b/scripts/test.ps1 @@ -237,7 +237,7 @@ function Invoke-Test $testContainerPath } } - $trxLogFileName = [System.String]::Format("Parallel_{0}_{1}", $fx, $Script:TPT_DefaultTrxFileName) + $trxLogFileName = [System.String]::Format("Parallel_{0}_{1}_{2}", $TPT_Pattern, $fx, $Script:TPT_DefaultTrxFileName) # Remove already existed trx file name as due to which warning will get generated and since we are expecting result in a particular format, that will break $fullTrxFilePath = Join-Path $Script:TPT_TestResultsDir $trxLogFileName