Fixing the build.

This commit is contained in:
Livar Cunha 2017-04-08 00:29:20 -07:00
parent e286c65d25
commit c8b042fd1b
5 changed files with 31 additions and 13 deletions

View file

@ -100,7 +100,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
_stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First();
_stage2WithBackwardsCompatibleRuntimesDirectory =
Path.Combine(_artifacts, "stage2WithBackwardsCompatibilityRuntimes");
Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes");
_testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
}

View file

@ -406,7 +406,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceFiles' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResource()
{
var projectDirectory = TestAssets
@ -431,6 +431,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
@ -458,7 +464,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceBuiltIn' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResourceBuiltIn()
{
var projectDirectory = TestAssets
@ -483,6 +489,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
@ -510,7 +522,7 @@ namespace Microsoft.DotNet.Migration.Tests
"The 'resourceExclude' option is deprecated. Use 'embed' in 'buildOptions' instead.");
}
[RequiresSpecificFrameworkFact("netcoreapp1.0")]
[Fact]
public void MigratingDeprecatedResourceExclude()
{
var projectDirectory = TestAssets
@ -534,6 +546,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
{
// running the app requires netcoreapp1.1
return;
}
var cmd = new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");