Skip to content

Commit b6581fe

Browse files
committed
Dedupe assembly list.
1 parent de0b99c commit b6581fe

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Source/Machine.VSTestAdapter/MspecTestAdapterExecutor.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrame
2222
{
2323
//Debugger.Launch();
2424

25-
foreach (string currentAsssembly in sources)
25+
Settings settings = GetSettings(runContext);
26+
27+
foreach (string currentAsssembly in sources.Distinct())
2628
{
2729
try
2830
{
2931
frameworkHandle.SendMessage(TestMessageLevel.Informational, String.Format(Strings.EXECUTOR_EXECUTINGIN, currentAsssembly));
3032

31-
Settings settings = GetSettings(runContext);
32-
3333
this.executor.RunAssembly(currentAsssembly, settings, uri, frameworkHandle);
3434
}
3535
catch (Exception ex)
@@ -50,10 +50,11 @@ public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrame
5050

5151
int executedSpecCount = 0;
5252

53+
Settings settings = GetSettings(runContext);
54+
5355
string currentAsssembly = string.Empty;
5456
try
5557
{
56-
Settings settings = GetSettings(runContext);
5758

5859
IEnumerable<IGrouping<string, TestCase>> groupByAssembly = tests.GroupBy(x => x.Source);
5960
foreach (IGrouping<string, TestCase> grouping in groupByAssembly) {

0 commit comments

Comments
 (0)