Skip to content

Commit 127e8f7

Browse files
committed
Fix InProcessBenchmarkEmitsSameIL tests.
1 parent 6906de3 commit 127e8f7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/BenchmarkDotNet/Running/BuildPartition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class BuildPartition
2121
{
2222
// We use an auto-increment global counter instead of Guid to guarantee uniqueness per benchmark run (Guid has a small chance to collide),
2323
// assuming there are fewer than 4 billion build partitions (a safe assumption).
24-
private static int s_partitionCounter;
24+
internal static int s_partitionCounter;
2525

2626
public BuildPartition(BenchmarkBuildInfo[] benchmarks, IResolver resolver)
2727
{

tests/BenchmarkDotNet.IntegrationTests/InProcessEmitTest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using BenchmarkDotNet.Jobs;
1111
using BenchmarkDotNet.Loggers;
1212
using BenchmarkDotNet.Reports;
13+
using BenchmarkDotNet.Running;
1314
using BenchmarkDotNet.Tests.Loggers;
1415
using BenchmarkDotNet.Tests.XUnit;
1516
using BenchmarkDotNet.Toolchains.InProcess.Emit;
@@ -68,10 +69,10 @@ private void DiffEmit(Summary summary)
6869
if (!Portability.RuntimeInformation.IsFullFramework)
6970
return;
7071

71-
var caseName = summary.BenchmarksCases.First().Job.ToString();
72+
var caseName = $"{typeof(InProcessEmitTest).Assembly.GetName().Name}-{summary.BenchmarksCases.First().Job}";
7273
NaiveRunnableEmitDiff.RunDiff(
73-
$@"{caseName}.exe",
74-
$@"{caseName}Emitted.dll",
74+
$@"{caseName}-{BuildPartition.s_partitionCounter}.exe",
75+
$@"{caseName}-{BuildPartition.s_partitionCounter - 1}Emitted.dll",
7576
ConsoleLogger.Default);
7677
}
7778

0 commit comments

Comments
 (0)