diff --git a/scripts/build/TestPlatform.Dependencies.props b/scripts/build/TestPlatform.Dependencies.props
index 30fcabab0e..04a239235d 100644
--- a/scripts/build/TestPlatform.Dependencies.props
+++ b/scripts/build/TestPlatform.Dependencies.props
@@ -19,6 +19,7 @@
3.8.0
4.3.7
+ 1.1.1
9.0.1
4.7.63
diff --git a/scripts/verify-nupkgs.ps1 b/scripts/verify-nupkgs.ps1
index 0bff808d7d..84ed4d6a4e 100644
--- a/scripts/verify-nupkgs.ps1
+++ b/scripts/verify-nupkgs.ps1
@@ -14,12 +14,12 @@ function Verify-Nuget-Packages($packageDirectory)
Write-Log "Starting Verify-Nuget-Packages."
$expectedNumOfFiles = @{"Microsoft.CodeCoverage" = 29;
"Microsoft.NET.Test.Sdk" = 13;
- "Microsoft.TestPlatform" = 421;
+ "Microsoft.TestPlatform" = 422;
"Microsoft.TestPlatform.Build" = 19;
- "Microsoft.TestPlatform.CLI" = 300;
+ "Microsoft.TestPlatform.CLI" = 301;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 33;
"Microsoft.TestPlatform.ObjectModel" = 62;
- "Microsoft.TestPlatform.Portable" = 469;
+ "Microsoft.TestPlatform.Portable" = 471;
"Microsoft.TestPlatform.TestHost" = 140;
"Microsoft.TestPlatform.TranslationLayer" = 121}
diff --git a/src/package/nuspec/Microsoft.TestPlatform.Portable.nuspec b/src/package/nuspec/Microsoft.TestPlatform.Portable.nuspec
index a0d836efc6..81d63e9f40 100644
--- a/src/package/nuspec/Microsoft.TestPlatform.Portable.nuspec
+++ b/src/package/nuspec/Microsoft.TestPlatform.Portable.nuspec
@@ -22,6 +22,7 @@
+
@@ -224,6 +225,7 @@
+
diff --git a/src/package/nuspec/Microsoft.TestPlatform.nuspec b/src/package/nuspec/Microsoft.TestPlatform.nuspec
index 9ca82f4d67..de164d2d71 100644
--- a/src/package/nuspec/Microsoft.TestPlatform.nuspec
+++ b/src/package/nuspec/Microsoft.TestPlatform.nuspec
@@ -97,6 +97,7 @@
+
diff --git a/src/vstest.console/CommandLine/CommandLineOptions.cs b/src/vstest.console/CommandLine/CommandLineOptions.cs
index 1d0aea2f4c..04e3c7e392 100644
--- a/src/vstest.console/CommandLine/CommandLineOptions.cs
+++ b/src/vstest.console/CommandLine/CommandLineOptions.cs
@@ -5,7 +5,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine
{
using System;
using System.Collections.Generic;
- using System.Globalization;
using System.Linq;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
@@ -15,6 +14,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine
using CommandLineResources = Microsoft.VisualStudio.TestPlatform.CommandLine.Resources.Resources;
using System.IO;
+ using vstest.console.Internal;
///
/// Provides access to the command-line options.
@@ -83,6 +83,7 @@ protected CommandLineOptions()
this.BatchSize = DefaultBatchSize;
this.TestStatsEventTimeout = this.DefaultRetrievalTimeout;
this.FileHelper = new FileHelper();
+ this.FilePatternParser = new FilePatternParser();
#if TODO
UseVsixExtensions = Utilities.GetAppSettingValue(UseVsixExtensionsKey, false);
#endif
@@ -238,6 +239,8 @@ public bool ShouldCollectSourceInformation
internal IFileHelper FileHelper { get; set; }
+ internal FilePatternParser FilePatternParser { get; set; }
+
///
/// Gets or sets the target Framework version for test run.
///
@@ -283,28 +286,20 @@ public void AddSource(string source)
{
throw new CommandLineException(CommandLineResources.CannotBeNullOrEmpty);
}
-
+
source = source.Trim();
-
+
// Convert the relative path to absolute path
- if(!Path.IsPathRooted(source))
+ if (!Path.IsPathRooted(source))
{
source = Path.Combine(FileHelper.GetCurrentDirectory(), source);
}
- if (!FileHelper.Exists(source))
- {
- throw new CommandLineException(
- string.Format(CultureInfo.CurrentUICulture, CommandLineResources.TestSourceFileNotFound, source));
- }
-
- if (this.sources.Contains(source, StringComparer.OrdinalIgnoreCase))
- {
- throw new CommandLineException(
- string.Format(CultureInfo.CurrentCulture, CommandLineResources.DuplicateSource, source));
- }
+ // Get matching files from file pattern parser
+ var matchingFiles = FilePatternParser.GetMatchingFiles(source);
- this.sources.Add(source);
+ // Add the matching files to source list
+ this.sources = this.sources.Union(matchingFiles).ToList();
}
#endregion
diff --git a/src/vstest.console/Internal/ConsoleLogger.cs b/src/vstest.console/Internal/ConsoleLogger.cs
index 35db258aa7..2162ec0770 100644
--- a/src/vstest.console/Internal/ConsoleLogger.cs
+++ b/src/vstest.console/Internal/ConsoleLogger.cs
@@ -176,6 +176,7 @@ public void Initialize(TestLoggerEvents events, string testRunDirectory)
events.TestRunMessage += this.TestMessageHandler;
events.TestResult += this.TestResultHandler;
events.TestRunComplete += this.TestRunCompleteHandler;
+ events.TestRunStart += this.TestRunStartHandler;
// Register for the discovery events.
events.DiscoveryMessage += this.TestMessageHandler;
@@ -358,6 +359,26 @@ private static void DisplayFullInformation(TestResult result)
#region Event Handlers
+ ///
+ /// Called when a test run start is received
+ ///
+ private void TestRunStartHandler(object sender, TestRunStartEventArgs e)
+ {
+ ValidateArg.NotNull