Disambiguate the intermediate directory

Parallel test runs were racing on the same response file in the common
intermediate directory.
Each builder test now has it's own intermediate directory
This commit is contained in:
Mihai Codoban 2016-01-20 16:00:19 -08:00
parent b2f5bbeeb0
commit 45c305e5a2

View file

@ -54,9 +54,10 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
protected CommandResult BuildProject(bool forceIncrementalUnsafe = false, bool expectBuildFailure = false)
{
var outputDir = GetBinDirectory();
var mainProject = GetProjectFile(_mainProject);
var intermediateOutputDir = Path.Combine(Directory.GetParent(outputDir).FullName, "obj", _mainProject);
var mainProjectFile = GetProjectFile(_mainProject);
var buildCommand = new BuildCommand(mainProject, output: outputDir, forceIncrementalUnsafe : forceIncrementalUnsafe);
var buildCommand = new BuildCommand(mainProjectFile, output: outputDir, tempOutput: intermediateOutputDir ,forceIncrementalUnsafe : forceIncrementalUnsafe);
var result = buildCommand.ExecuteWithCapturedOutput();
if (!expectBuildFailure)