fix cache test

This commit is contained in:
Rama Krishnan Raghupathy 2017-03-03 14:27:35 -08:00
parent 94dab4559a
commit 99301d0d95
5 changed files with 12 additions and 8 deletions

View file

@ -0,0 +1,3 @@
<CacheArtifacts>
<Package Id="Newtonsoft.Json" Version ="9.0.1"/>
</CacheArtifacts>

View file

@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.Publish
if (!string.IsNullOrEmpty(filterProjOption.Value()))
{
msbuildArgs.Add($"/p:FilterProjFile={filterProjOption.Value()}");
msbuildArgs.Add($"/p:FilterProjectFiles={filterProjOption.Value()}");
}
if (!string.IsNullOrEmpty(verbosityOption.Value()))

View file

@ -17,12 +17,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
{
private static string _tfm = "netcoreapp2.0";
private static string _frameworkVersion = Microsoft.DotNet.TestFramework.TestAssetInstance.CurrentRuntimeFrameworkVersion;
private static string _arch = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant();
[Fact]
public void ItPublishesARunnablePortableApp()
{
var testAppName = "NewtonSoftDependentProject";
var profileProjectName = "NewtonsoftFilterProfile";
var profileProjectName = "NewtonsoftProfile";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance()
@ -55,11 +55,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
.Should().Pass();
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var profilefilter = Path.Combine(localAssemblyCache, _arch, _tfm, "artifact.xml");
new PublishCommand()
.WithFramework(_tfm)
.WithWorkingDirectory(testProjectDirectory)
.WithProFileProject(profileProject)
.WithProFileProject(profilefilter)
.Execute()
.Should().Pass();
@ -76,7 +77,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
public void AppFailsDueToMissingCache()
{
var testAppName = "NewtonSoftDependentProject";
var profileProjectName = "NewtonsoftFilterProfile";
var profileProjectName = "NewtonsoftProfile";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance()
@ -88,7 +89,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
.CreateInstance()
.WithSourceFiles()
.Root.FullName;
var profileProject = Path.Combine(profileProjectPath, $"{profileProjectName}.xml");
var profileProject = Path.Combine(profileProjectPath, "NewtonsoftFilterProfile.xml");
new RestoreCommand()
.WithWorkingDirectory(testProjectDirectory)

View file

@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
[InlineData(new string[] { "-c", "<configuration>" }, "/p:Configuration=<configuration>")]
[InlineData(new string[] { "--configuration", "<configuration>" }, "/p:Configuration=<configuration>")]
[InlineData(new string[] { "--version-suffix", "<version-suffix>" }, "/p:VersionSuffix=<version-suffix>")]
[InlineData(new string[] { "--filter", "<filter>" }, "/p:FilterProjFile=<filter>")]
[InlineData(new string[] { "--filter", "<filter>" }, "/p:FilterProjectFiles=<filter>")]
[InlineData(new string[] { "-v", "<verbosity>" }, "/verbosity:<verbosity>")]
[InlineData(new string[] { "--verbosity", "<verbosity>" }, "/verbosity:<verbosity>")]
[InlineData(new string[] { "<project>" }, "<project>")]