Fix and re-enable build3 tests.
This commit is contained in:
parent
6b04136c31
commit
2b741bca27
3 changed files with 38 additions and 26 deletions
|
@ -136,6 +136,10 @@
|
||||||
<Copy SourceFiles="$(SdkOutputDirectory)/%(FilesToMove.Identity)"
|
<Copy SourceFiles="$(SdkOutputDirectory)/%(FilesToMove.Identity)"
|
||||||
DestinationFiles="$(SdkOutputDirectory)/%(FilesToMove.Filename).dll" />
|
DestinationFiles="$(SdkOutputDirectory)/%(FilesToMove.Filename).dll" />
|
||||||
|
|
||||||
|
<!-- MSBuild needs csc.exe to be in the SdkOutputDirectory, or else it can't invoke it -->
|
||||||
|
<Move SourceFiles="$(BinaryToCorehostifyOutDir)/csc.exe"
|
||||||
|
DestinationFiles="$(SdkOutputDirectory)/csc.exe" />
|
||||||
|
|
||||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,9 @@
|
||||||
|
|
||||||
<PreTestProjectsToExclude Include="test$(PathSeparator)**$(PathSeparator)bin$(PathSeparator)**$(PathSeparator)project.json" />
|
<PreTestProjectsToExclude Include="test$(PathSeparator)**$(PathSeparator)bin$(PathSeparator)**$(PathSeparator)project.json" />
|
||||||
|
|
||||||
<PreTestProjectsToExclude Include="test$(PathSeparator)dotnet-build3.Tests$(PathSeparator)project.json" />
|
<!-- The current ResolveNuGetAssets target does not work on case-sensitive file systems. We need https://github.com/dotnet/sdk/pull/10 -->
|
||||||
|
<PreTestProjectsToExclude Condition="'$(OSName)' != 'win' and '$(OSName)' != 'osx'"
|
||||||
|
Include="test$(PathSeparator)dotnet-build3.Tests$(PathSeparator)project.json" />
|
||||||
|
|
||||||
<TestProjectsToExclude Include="%(PreTestProjectsToExclude.RelativeDir)project.json" />
|
<TestProjectsToExclude Include="%(PreTestProjectsToExclude.RelativeDir)project.json" />
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
@ -8,38 +9,43 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
{
|
{
|
||||||
public class GivenDotNetUsesMSBuild : TestBase
|
public class GivenDotNetUsesMSBuild : TestBase
|
||||||
{
|
{
|
||||||
[Fact(Skip="ResolveNuGetPackageAssets needs to be made case insensitive.")]
|
[Fact]
|
||||||
public void ItCanNewRestoreBuildRunMSBuildProject()
|
public void ItCanNewRestoreBuildRunMSBuildProject()
|
||||||
{
|
{
|
||||||
using (DisposableDirectory directory = Temp.CreateDirectory())
|
// The current ResolveNuGetAssets target does not work on case-sensitive file systems. We need https://github.com/dotnet/sdk/pull/10
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
|
||||||
|
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
{
|
{
|
||||||
string projectDirectory = directory.Path;
|
using (DisposableDirectory directory = Temp.CreateDirectory())
|
||||||
|
{
|
||||||
|
string projectDirectory = directory.Path;
|
||||||
|
|
||||||
new NewCommand()
|
new NewCommand()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute("-t msbuild")
|
.Execute("-t msbuild")
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
new RestoreCommand()
|
new RestoreCommand()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute()
|
.Execute()
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
new Build3Command()
|
new Build3Command()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.Execute()
|
.Execute()
|
||||||
.Should()
|
.Should()
|
||||||
.Pass();
|
.Pass();
|
||||||
|
|
||||||
new Run3Command()
|
new Run3Command()
|
||||||
.WithWorkingDirectory(projectDirectory)
|
.WithWorkingDirectory(projectDirectory)
|
||||||
.ExecuteWithCapturedOutput()
|
.ExecuteWithCapturedOutput()
|
||||||
.Should()
|
.Should()
|
||||||
.Pass()
|
.Pass()
|
||||||
.And
|
.And
|
||||||
.HaveStdOutContaining("Hello World!");
|
.HaveStdOutContaining("Hello World!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue