Skip to content

Commit 9fe5180

Browse files
committed
another binlog
1 parent cfd1af2 commit 9fe5180

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/Microsoft.NET.ToolPack.Tests/GivenThatWeWantToPackAToolProjectWithPackagedShim.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,15 @@ public void It_contains_shim_with_no_build(bool multiTarget, string targetFramew
258258
{
259259
var testAsset = CreateTestAsset(multiTarget, nameof(It_contains_shim_with_no_build) + multiTarget + targetFramework, targetFramework);
260260

261-
var buildCommand = new BuildCommand(testAsset);
261+
var buildCommand = new BuildCommand(testAsset).WithWorkingDirectory(testAsset.Path);
262262
buildCommand.Execute().Should().Pass();
263263

264-
var packCommand = new PackCommand(testAsset);
264+
var packCommand = new PackCommand(testAsset).WithWorkingDirectory(testAsset.Path) as PackCommand;
265+
var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot ?
266+
Path.Combine(ciOutputRoot, "binlog", $"{nameof(It_contains_shim_with_no_build)}_{multiTarget}_{targetFramework}.binlog") :
267+
"./msbuild.binlog";
265268

266-
packCommand.Execute("/p:NoBuild=true").Should().Pass();
269+
packCommand.Execute($"/p:NoBuild=true", $"/bl:{binlogDestPath}").Should().Pass();
267270
var nugetPackage = packCommand.GetNuGetPackage();
268271

269272
using (var nupkgReader = new PackageArchiveReader(nugetPackage))

0 commit comments

Comments
 (0)