Skip to content

Commit b9baaaf

Browse files
authored
VSharp process start fix (#1484)
[utbot-rider] fixing VSharp process start
1 parent c41b215 commit b9baaaf

File tree

4 files changed

+3
-28
lines changed

4 files changed

+3
-28
lines changed

utbot-rider/src/dotnet/UtBot/UtBot.Rd/RdWriter.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

utbot-rider/src/dotnet/UtBot/UtBot.VSharp/VSharpMain.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public static class VSharpMain
2121
public static readonly string VSharpProcessName = "VSharp";
2222
public static void Main(string[] args)
2323
{
24-
// TextWriter);
2524
using var blockingQueue = new BlockingCollection<string>(1);
2625
var port = int.Parse(args[0]);
2726
var ldef = new LifetimeDefinition();

utbot-rider/src/dotnet/UtBot/UtBot/ProcessWithRdServer.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ProcessWithRdServer(string name, int port, string exePath, IShellLocks sh
4141
var wire = new SocketWire.Server(Lifetime, scheduler, socket);
4242
var serializers = new Serializers();
4343
var identities = new Identities(IdKind.Server);
44-
var startInfo = new ProcessStartInfo(exePath, $"{port}");
44+
var startInfo = new ProcessStartInfo("dotnet", $"{exePath} {port}");
4545
Protocol = new Protocol(name, serializers, identities, scheduler, wire, Lifetime);
4646
scheduler.Queue(() =>
4747
{
@@ -53,14 +53,10 @@ public ProcessWithRdServer(string name, int port, string exePath, IShellLocks sh
5353
blockingCollection.TryAdd(s);
5454
}
5555
});
56-
// VSharpModel.?
5756
});
5857
_process = new Process();
59-
// _process.ErrorDataReceived;
60-
// _process.EnableRaisingEvents;
61-
// _process.
62-
Lifetime.OnTermination(() => _process.Kill(entireProcessTree: true));
6358
_process.StartInfo = startInfo;
59+
Lifetime.OnTermination(() => _process.Kill(entireProcessTree: true));
6460
if (_process.Start())
6561
_process.Exited += (_, _) => _ldef.Terminate();
6662
else

utbot-rider/src/dotnet/UtBot/UtBot/UnitTestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private void Generate(IBackgroundProgressIndicator progressIndicator, IProject p
139139
project.Locks.AssertNonMainThread();
140140
var pluginPath = FileSystemPath.Parse(Assembly.GetExecutingAssembly().Location)
141141
.Parent;
142-
var vsharpRunner = pluginPath.Combine("UtBot.VSharp");
142+
var vsharpRunner = pluginPath.Combine("UtBot.VSharp.dll");
143143
var port = NetworkUtil.GetFreePort();
144144
var proc = new ProcessWithRdServer(VSharpMain.VSharpProcessName, port, vsharpRunner.FullPath, project.Locks, _lifetime);
145145
var projectCsprojPath = project.ProjectFileLocation.FullPath;

0 commit comments

Comments
 (0)