From 540c2b009115e911f21f4486eab361ac090755b3 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 27 Jan 2017 15:33:51 -0800 Subject: [PATCH] Disable parallel build of test.sln --- build/Microsoft.DotNet.Cli.Test.targets | 3 +- .../dotnet-cli-build/DotNetBuild.cs | 4 +-- .../dotnet-cli-build/DotNetMSBuild.cs | 4 +-- .../dotnet-cli-build/DotNetMSBuildTool.cs | 36 +++++++++++++++++++ build_projects/dotnet-cli-build/DotNetPack.cs | 4 +-- .../dotnet-cli-build/DotNetPublish.cs | 4 +-- .../dotnet-cli-build/DotNetRestore.cs | 4 +-- build_projects/dotnet-cli-build/DotNetTest.cs | 4 +-- 8 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 build_projects/dotnet-cli-build/DotNetMSBuildTool.cs diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index fcbd1a6684..2b85daa3e6 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -82,7 +82,8 @@ + ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln"" + MaxCpuCount="1" /> 0) + { + return $"/m:{MaxCpuCount}"; + } + + return null; + } + } +} diff --git a/build_projects/dotnet-cli-build/DotNetPack.cs b/build_projects/dotnet-cli-build/DotNetPack.cs index 96bcbc8848..bf4bef93dd 100644 --- a/build_projects/dotnet-cli-build/DotNetPack.cs +++ b/build_projects/dotnet-cli-build/DotNetPack.cs @@ -3,7 +3,7 @@ namespace Microsoft.DotNet.Cli.Build { - public class DotNetPack : DotNetTool + public class DotNetPack : DotNetMSBuildTool { protected override string Command { @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; } } public string Configuration { get; set; } diff --git a/build_projects/dotnet-cli-build/DotNetPublish.cs b/build_projects/dotnet-cli-build/DotNetPublish.cs index 8fbb88cbcb..f4c2aec24c 100644 --- a/build_projects/dotnet-cli-build/DotNetPublish.cs +++ b/build_projects/dotnet-cli-build/DotNetPublish.cs @@ -3,7 +3,7 @@ namespace Microsoft.DotNet.Cli.Build { - public class DotNetPublish : DotNetTool + public class DotNetPublish : DotNetMSBuildTool { protected override string Command { @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; } } public string BuildBasePath { get; set; } diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs index d3f1a2b4df..88bca5e225 100644 --- a/build_projects/dotnet-cli-build/DotNetRestore.cs +++ b/build_projects/dotnet-cli-build/DotNetRestore.cs @@ -3,7 +3,7 @@ namespace Microsoft.DotNet.Cli.Build { - public class DotNetRestore : DotNetTool + public class DotNetRestore : DotNetMSBuildTool { protected override string Command { @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } } public string ConfigFile { get; set; } diff --git a/build_projects/dotnet-cli-build/DotNetTest.cs b/build_projects/dotnet-cli-build/DotNetTest.cs index fd10ed7eaf..6ed55055c1 100644 --- a/build_projects/dotnet-cli-build/DotNetTest.cs +++ b/build_projects/dotnet-cli-build/DotNetTest.cs @@ -3,7 +3,7 @@ namespace Microsoft.DotNet.Cli.Build { - public class DotNetTest : DotNetTool + public class DotNetTest : DotNetMSBuildTool { protected override string Command { @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; } } public string Configuration { get; set; }