Skip to content

Commit 565870f

Browse files
authored
Allow custom runtimes to use Executor (#2285)
* Allow custom runtimes to use Executor * Apply @AndreyAkinshin's suggestion
1 parent 6162e9d commit 565870f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using BenchmarkDotNet.Jobs;
2+
3+
namespace BenchmarkDotNet.Environments
4+
{
5+
public abstract class CustomRuntime : Runtime
6+
{
7+
protected CustomRuntime(RuntimeMoniker runtimeMoniker, string msBuildMoniker, string displayName)
8+
: base(runtimeMoniker, msBuildMoniker, displayName)
9+
{
10+
}
11+
}
12+
}

src/BenchmarkDotNet/Toolchains/Executor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ private static ProcessStartInfo CreateStartInfo(BenchmarkCase benchmarkCase, Art
148148
start.Arguments = args;
149149
start.WorkingDirectory = artifactsPaths.BinariesDirectoryPath;
150150
break;
151+
case CustomRuntime _:
152+
start.FileName = exePath;
153+
start.Arguments = args;
154+
break;
151155
default:
152156
throw new NotSupportedException("Runtime = " + runtime);
153157
}

0 commit comments

Comments
 (0)