diff --git a/KoreBuild-dotnet/build/_dotnet-test.shade b/KoreBuild-dotnet/build/_dotnet-test.shade index b11efad620..99cdce363e 100644 --- a/KoreBuild-dotnet/build/_dotnet-test.shade +++ b/KoreBuild-dotnet/build/_dotnet-test.shade @@ -10,9 +10,13 @@ dotnet-test projectFile='' Required. Path to the test project.json to execute - + +configuration='' + Optional. The configuration to build in. Defaults to 'Debug'. */} +default configuration = 'Debug' + @{ var projectText = File.ReadAllText(projectFile); var project = (JsonObject)Json.Deserialize(projectText); @@ -25,13 +29,7 @@ projectFile='' var projectFolder = Path.GetDirectoryName(projectFile); 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 = noParallelTestProjects.Contains(projectName) ? " -parallel none" : ""; + var testArgs = "--configuration " + configuration; var configs = project.ValueAsJsonObject("frameworks"); IEnumerable targetFrameworks = configs == null? diff --git a/KoreBuild-dotnet/build/_k-standard-goals.shade b/KoreBuild-dotnet/build/_k-standard-goals.shade index e1c5977720..891e16aa80 100644 --- a/KoreBuild-dotnet/build/_k-standard-goals.shade +++ b/KoreBuild-dotnet/build/_k-standard-goals.shade @@ -180,8 +180,8 @@ default NUGET_FEED = 'https://api.nuget.org/v3/index.json' #xunit-test target='test' if='Directory.Exists("test")' @{ var projectFiles = Files.Include("test/**/project.json").Exclude("**/bin/*/app/project.json").ToList(); - projectFiles.ForEach(projectFile => XunitTest(projectFile, testParallel: false)); - projectFiles.ForEach(projectFile => DotnetTest(projectFile, testParallel: false)); + projectFiles.ForEach(projectFile => XunitTest(projectFile, testParallel: false, configuration: Configuration)); + projectFiles.ForEach(projectFile => DotnetTest(projectFile, testParallel: false, configuration: Configuration)); projectFiles.ForEach(projectFile => DnxTest(projectFile, testParallel: false)); } @@ -357,11 +357,14 @@ macro name="DotnetPack" projectFile='string' dotnetPackOutputDir='string' config macro name="DotnetPublish" projectFile='string' outputFolder='string' framework='string' dotnet-publish + +macro name="DotnetPublish" projectFile='string' outputFolder='string' framework='string' configuration='string' + dotnet-publish -macro name="DotnetTest" projectFile='string' testParallel='bool' +macro name="DotnetTest" projectFile='string' testParallel='bool' configuration='string' dotnet-test -macro name="XunitTest" projectFile='string' testParallel='bool' +macro name="XunitTest" projectFile='string' testParallel='bool' configuration='string' xunit-test macro name='Dnx' command='string' dnxDir='string' dnvmUse='string' diff --git a/KoreBuild-dotnet/build/_xunit-test.shade b/KoreBuild-dotnet/build/_xunit-test.shade index 3e187d56ff..d54c12605f 100644 --- a/KoreBuild-dotnet/build/_xunit-test.shade +++ b/KoreBuild-dotnet/build/_xunit-test.shade @@ -12,8 +12,12 @@ xunit-test projectFile='' Required. Path to the test project.json to execute +configuration='' + Optional. The configuration to build in. Defaults to 'Debug'. */} +default configuration = 'Debug' + @{ if (!string.Equals(KOREBUILD_TEST_SKIPMONO, "1") && !string.Equals(KOREBUILD_TEST_SKIPMONO, "true")) { @@ -52,7 +56,7 @@ projectFile='' } var publishFolder = Path.Combine(projectFolder, "obj", "testPublish-" + framework); - DotnetPublish(projectFile, publishFolder, framework); + DotnetPublish(projectFile, publishFolder, framework, configuration); var runnerExe = "xunit.console.exe"; string runnerFullPath;