Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonescz committed Aug 23, 2024
1 parent d265037 commit 017efb9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ public void ILLink_shows_single_warning_for_packagereferences_only(string target
.CopyTestAsset(testAssetName, identifier: targetFramework)
.WithSource();

NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages);

var publishCommand = new PublishCommand(testAsset, "App");
publishCommand.Execute($"/p:RuntimeIdentifier={rid}")
.Should().Pass()
Expand All @@ -701,6 +703,8 @@ public void ILLink_accepts_option_to_show_all_warnings(string targetFramework)
.CopyTestAsset(testAssetName, identifier: targetFramework)
.WithSource();

NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages);

var publishCommand = new PublishCommand(testAsset, "App");
publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:TrimmerSingleWarn=false")
.Should().Pass()
Expand All @@ -727,6 +731,8 @@ public void ILLink_can_show_single_warning_per_assembly(string targetFramework)
SetMetadata(project, "App", "TrimmerSingleWarn", "true");
});

NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages);

var publishCommand = new PublishCommand(testAsset, "App");
publishCommand.Execute($"/p:RuntimeIdentifier={rid}", "/p:TrimmerSingleWarn=false")
.Should().Pass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
</PropertyGroup>

<Target Name="BuildLocalNuget" BeforeTargets="Restore">
<MSBuild
Projects="../PackageReference/PackageReference.csproj"
Targets="Restore;Pack"
/>
<Exec
Command="&quot;$(MSBuildBinPath)\msbuild&quot; ..\PackageReference\PackageReference.csproj /t:Pack /restore"
WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>

<ItemGroup>
Expand Down

0 comments on commit 017efb9

Please sign in to comment.