diff --git a/KoreBuild-dotnet/build/_dotnet-test.shade b/KoreBuild-dotnet/build/_dotnet-test.shade index d8a95c021b..93f440a349 100644 --- a/KoreBuild-dotnet/build/_dotnet-test.shade +++ b/KoreBuild-dotnet/build/_dotnet-test.shade @@ -18,7 +18,16 @@ default configuration = 'Debug' @{ var projectFolder = Path.GetDirectoryName(projectFile); - var testArgs = "--configuration " + configuration; - Dotnet("test " + testArgs, projectFolder); + var projectName = Path.GetFileName(projectFolder); + + var noParallelTestProjects = new HashSet(StringComparer.OrdinalIgnoreCase); + if (!string.IsNullOrEmpty(NO_PARALLEL_TEST_PROJECTS)) + { + noParallelTestProjects.UnionWith(NO_PARALLEL_TEST_PROJECTS.Split((char)',')); + } + + var testArgs = " --configuration " + configuration; + testArgs += noParallelTestProjects.Contains(projectName) || IsLinux ? " -parallel none" : ""; + Dotnet("test" + testArgs, projectFolder); }