Update test to target .NET Core 3.0

This commit is contained in:
Daniel Plaisted 2018-07-06 17:58:44 -07:00
parent 21fec561ee
commit cf0441cf6e
2 changed files with 45 additions and 33 deletions

View file

@ -3,6 +3,8 @@
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
@ -19,12 +21,22 @@ namespace Microsoft.DotNet.Tests.EndToEnd
{
string projectDirectory = directory.Path;
string newArgs = "console -f netcoreapp2.1 --debug:ephemeral-hive --no-restore";
string newArgs = "console --debug:ephemeral-hive --no-restore";
new NewCommandShim()
.WithWorkingDirectory(projectDirectory)
.Execute(newArgs)
.Should().Pass();
string projectPath = Directory.GetFiles(projectDirectory, "*.csproj").Single();
// Override TargetFramework since there aren't .NET Core 3 templates yet
XDocument project = XDocument.Load(projectPath);
var ns = project.Root.Name.Namespace;
project.Root.Element(ns + "PropertyGroup")
.Element(ns + "TargetFramework")
.Value = "netcoreapp3.0";
project.Save(projectPath);
new RestoreCommand()
.WithWorkingDirectory(projectDirectory)
.Execute("/p:SkipInvalidConfigurations=true")
@ -65,7 +77,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
new DotnetCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput("portable")
.ExecuteWithCapturedOutput("-d portable")
.Should()
.Pass()
.And
@ -84,7 +96,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
new DotnetCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput("prefercliruntime")
.ExecuteWithCapturedOutput("-d prefercliruntime")
.Should().Pass()
.And.HaveStdOutContaining("Hello I prefer the cli runtime World!");;
}

View file

@ -2,11 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.TestFramework", "Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj", "{BEA33DFA-8559-4680-B40A-B522FBF37567}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramework", "Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj", "{BEA33DFA-8559-4680-B40A-B522FBF37567}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Tools.Tests.Utilities", "Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{770FE8B9-6381-4328-AA36-D6A21114701E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{770FE8B9-6381-4328-AA36-D6A21114701E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EndToEnd", "EndToEnd\EndToEnd.csproj", "{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd", "EndToEnd\EndToEnd.csproj", "{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -17,46 +17,46 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x64.ActiveCfg = Debug|x64
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x64.Build.0 = Debug|x64
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x86.ActiveCfg = Debug|x86
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x86.Build.0 = Debug|x86
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x64.ActiveCfg = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x64.Build.0 = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x86.ActiveCfg = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Debug|x86.Build.0 = Debug|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|Any CPU.Build.0 = Release|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x64.ActiveCfg = Release|x64
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x64.Build.0 = Release|x64
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x86.ActiveCfg = Release|x86
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x86.Build.0 = Release|x86
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x64.ActiveCfg = Release|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x64.Build.0 = Release|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x86.ActiveCfg = Release|Any CPU
{BEA33DFA-8559-4680-B40A-B522FBF37567}.Release|x86.Build.0 = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x64.ActiveCfg = Debug|x64
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x64.Build.0 = Debug|x64
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x86.ActiveCfg = Debug|x86
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x86.Build.0 = Debug|x86
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x64.ActiveCfg = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x64.Build.0 = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x86.ActiveCfg = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Debug|x86.Build.0 = Debug|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|Any CPU.Build.0 = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x64.ActiveCfg = Release|x64
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x64.Build.0 = Release|x64
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x86.ActiveCfg = Release|x86
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x86.Build.0 = Release|x86
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x64.ActiveCfg = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x64.Build.0 = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x86.ActiveCfg = Release|Any CPU
{770FE8B9-6381-4328-AA36-D6A21114701E}.Release|x86.Build.0 = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x64.ActiveCfg = Debug|x64
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x64.Build.0 = Debug|x64
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x86.ActiveCfg = Debug|x86
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x86.Build.0 = Debug|x86
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x64.ActiveCfg = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x64.Build.0 = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x86.ActiveCfg = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Debug|x86.Build.0 = Debug|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|Any CPU.Build.0 = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x64.ActiveCfg = Release|x64
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x64.Build.0 = Release|x64
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x86.ActiveCfg = Release|x86
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x86.Build.0 = Release|x86
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x64.ActiveCfg = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x64.Build.0 = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x86.ActiveCfg = Release|Any CPU
{AEB7B217-D4C4-46F1-9495-87F869F0ABE4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7AF6777A-0133-453A-B302-FDD974B8F39C}