Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable package aliasing tests #39144

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions eng/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ jobs:
log/$(_BuildConfig)/**/*
TestResults/$(_BuildConfig)/**/*
SymStore/$(_BuildConfig)/**/*
tmp/$(_BuildConfig)/**/*.binlog
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: always()
Expand Down Expand Up @@ -321,6 +322,7 @@ jobs:
log/$(_BuildConfig)/**/*
TestResults/$(_BuildConfig)/**/*
SymStore/$(_BuildConfig)/**/*
tmp/$(_BuildConfig)/**/*.binlog
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: always()
Expand Down Expand Up @@ -463,6 +465,7 @@ jobs:
log/$(_BuildConfig)/**/*
TestResults/$(_BuildConfig)/**/*
SymStore/$(_BuildConfig)/**/*
tmp/$(_BuildConfig)/**/*.binlog
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public GivenThatWeHaveAPackageReferenceWithAliases(ITestOutputHelper log) : base
public void CanBuildProjectWithPackageReferencesWithConflictingTypes()
{
var targetFramework = ToolsetInfo.CurrentTargetFramework;
var packageReferences = GetPackageReferencesWithConflictingTypes(targetFramework, packageNames: new string[] { "A", "B" });
var packageReferences = GetPackageReferencesWithConflictingTypes(targetFramework, packageNames: new string[] { "ConflictingA", "ConflictingB" });

TestProject testProject = new()
{
Expand Down Expand Up @@ -43,13 +43,14 @@ public void CanBuildProjectWithPackageReferencesWithConflictingTypes()
sources.AddRange(packagesPaths);
NuGetConfigWriter.Write(testAsset.TestRoot, sources);

var buildCommand = new BuildCommand(testAsset);
buildCommand.Execute()
var buildCommand = new BuildCommand(testAsset)
.WithWorkingDirectory(testAsset.Path);
buildCommand.Execute("-bl")
.Should()
.Pass();
}

[RequiresMSBuildVersionFact("16.8.0", Skip = "https://github.com/dotnet/sdk/issues/38268")]
[RequiresMSBuildVersionFact("16.8.0")]
public void CanBuildProjectWithMultiplePackageReferencesWithAliases()
{
var targetFramework = ToolsetInfo.CurrentTargetFramework;
Expand Down Expand Up @@ -87,8 +88,9 @@ public void CanBuildProjectWithMultiplePackageReferencesWithAliases()
List<string> sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed, Path.GetDirectoryName(packageReferenceA.NupkgPath), Path.GetDirectoryName(packageReferenceB.NupkgPath) };
NuGetConfigWriter.Write(testAsset.TestRoot, sources);

var buildCommand = new BuildCommand(testAsset);
buildCommand.Execute()
var buildCommand = new BuildCommand(testAsset)
.WithWorkingDirectory(testAsset.Path);
buildCommand.Execute("-bl")
.Should()
.Pass();
}
Expand All @@ -98,7 +100,7 @@ public void CanBuildProjectWithAPackageReferenceWithMultipleAliases()
{
var targetFramework = ToolsetInfo.CurrentTargetFramework;

var packageReferenceA = GetPackageReference(targetFramework, "A", ClassLibMultipleClasses);
var packageReferenceA = GetPackageReference(targetFramework, "MultipleClasses", ClassLibMultipleClasses);

TestProject testProject = new()
{
Expand All @@ -123,8 +125,9 @@ public void CanBuildProjectWithAPackageReferenceWithMultipleAliases()
List<string> sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed, Path.GetDirectoryName(packageReferenceA.NupkgPath) };
NuGetConfigWriter.Write(testAsset.TestRoot, sources);

var buildCommand = new BuildCommand(testAsset);
buildCommand.Execute()
var buildCommand = new BuildCommand(testAsset)
.WithWorkingDirectory(testAsset.Path);
buildCommand.Execute("-bl")
.Should()
.Pass();
}
Expand Down