Skip to content

Commit cd25da5

Browse files
committed
Check on test projects for mixed mode
1 parent 225a18f commit cd25da5

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/Cli/dotnet/commands/dotnet-test/MSBuildHandler.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,22 @@ private void InitializeTestApplications(IEnumerable<Module> modules)
134134
{
135135
foreach (Module module in modules)
136136
{
137-
if (module.IsTestProject && module.IsTestingPlatformApplication)
137+
if (module.IsTestProject)
138138
{
139-
var testApp = new TestApplication(module, _args);
140-
_testApplications.Add(testApp);
139+
if (module.IsTestingPlatformApplication)
140+
{
141+
var testApp = new TestApplication(module, _args);
142+
_testApplications.Add(testApp);
143+
}
144+
else // If one test app has IsTestingPlatformApplication set to false, then we will not run any of the test apps
145+
{
146+
_areTestingPlatformApplications = false;
147+
return;
148+
}
141149
}
142-
else // If one test app has IsTestingPlatformApplication set to false, then we will not run any of the test apps
150+
else
143151
{
144-
_areTestingPlatformApplications = false;
145-
return;
152+
// Non test projects, like the projects that include production code are skipped over, we won't run them.
146153
}
147154
}
148155
}
@@ -335,7 +342,7 @@ private static bool IsBinaryLoggerEnabled(List<string> args, out string binLogFi
335342
}
336343
else
337344
{
338-
binLogFileName = CliConstants.BinLogFileName;
345+
binLogFileName = $"msbuild_{Guid.NewGuid().ToString()}.binlog";
339346
}
340347

341348
return true;

0 commit comments

Comments
 (0)