Resolve test server paths deterministically (#1735)
Copilot-Session: ad8afb00-2809-4785-8781-014a90c8abf1
This commit is contained in:
parent
bdaa95c0ed
commit
5f5d5eac50
1 changed files with 9 additions and 5 deletions
|
|
@ -154,6 +154,8 @@ public class StdioClientTransportTests(ITestOutputHelper testOutputHelper) : Log
|
|||
}
|
||||
|
||||
string cliArgument = $"--cli-arg={cliArgumentValue}";
|
||||
string testServerExecutable = Path.Combine(AppContext.BaseDirectory, "TestServer.exe");
|
||||
string testServerDll = Path.Combine(AppContext.BaseDirectory, "TestServer.dll");
|
||||
|
||||
StdioClientTransportOptions options = new()
|
||||
{
|
||||
|
|
@ -161,14 +163,14 @@ public class StdioClientTransportTests(ITestOutputHelper testOutputHelper) : Log
|
|||
Command = (PlatformDetection.IsMonoRuntime, PlatformDetection.IsWindows) switch
|
||||
{
|
||||
(true, _) => "mono",
|
||||
(_, true) => "TestServer.exe",
|
||||
(_, true) => testServerExecutable,
|
||||
_ => "dotnet",
|
||||
},
|
||||
Arguments = (PlatformDetection.IsMonoRuntime, PlatformDetection.IsWindows) switch
|
||||
{
|
||||
(true, _) => ["TestServer.exe", cliArgument],
|
||||
(true, _) => [testServerExecutable, cliArgument],
|
||||
(_, true) => [cliArgument],
|
||||
_ => ["TestServer.dll", cliArgument],
|
||||
_ => [testServerDll, cliArgument],
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue