Skip to content

Commit

Permalink
Fix BenchmarkDotNet test adapter not running tests with dotnet test (#…
Browse files Browse the repository at this point in the history
…2571)

* fix VsTestAdapter test filtering

* CR fixes
  • Loading branch information
sheffer21 committed May 19, 2024
1 parent 205ce61 commit 063d2f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet.TestAdapter/BenchmarkExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void RunBenchmarks(string assemblyPath, TestExecutionRecorderWrapper reco
foreach (var benchmarkCase in benchmark.BenchmarksCases)
{
var testId = benchmarkCase.GetTestCaseId();
if (benchmarkIds != null && benchmarkIds.Contains(testId))
if (benchmarkIds == null || benchmarkIds.Contains(testId))
{
filteredCases.Add(benchmarkCase);
testCases.Add(benchmarkCase.ToVsTestCase(assemblyPath, needsJobInfo));
Expand Down

0 comments on commit 063d2f0

Please sign in to comment.