Skip to content

Commit 6b5e884

Browse files
committed
[utbot-rider]
fixes CLI arguments and process working dir
1 parent 28e6636 commit 6b5e884

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

gradle.properties

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ intellijPluginVersion=1.7.0
3939
# 2. check if rider plugin works
4040
rdVersion=2022.2.1
4141
# to enable - add -PincludeRiderInBuild=true in build CLI
42-
includeRiderInBuild=false
42+
includeRiderInBuild=true
4343
jacocoVersion=0.8.8
4444
commonsLangVersion=3.11
4545
commonsIoVersion=2.8.0
@@ -75,16 +75,16 @@ openblasVersion=0.3.10-1.5.4
7575
arpackNgVersion=3.7.0-1.5.4
7676

7777
# configuration for build server
78-
org.gradle.daemon=false
79-
org.gradle.parallel=false
80-
org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
81-
kotlin.compiler.execution.strategy=in-process
82-
org.gradle.caching=false
78+
#org.gradle.daemon=false
79+
#org.gradle.parallel=false
80+
#org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
81+
#kotlin.compiler.execution.strategy=in-process
82+
#org.gradle.caching=false
8383

8484
# configuration for local compilation - much faster
85-
#org.gradle.daemon=true
86-
#kotlin.daemon.jvm.options=-Xmx4g
87-
#org.gradle.parallel=true
88-
#org.gradle.caching=true
89-
#org.gradle.workers.max=8
90-
#org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
85+
org.gradle.daemon=true
86+
kotlin.daemon.jvm.options=-Xmx4g
87+
org.gradle.parallel=true
88+
org.gradle.caching=true
89+
org.gradle.workers.max=8
90+
org.gradle.jvmargs="-XX:MaxHeapSize=6144m"

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class ProcessWithRdServer
2626
private Process _process;
2727
private ILogger _logger = Logger.GetLogger<ProcessWithRdServer>();
2828

29-
public ProcessWithRdServer(string name, int port, string exePath, IShellLocks shellLocks, Lifetime? parent = null)
29+
public ProcessWithRdServer(string name, string workingDir, int port, string exePath, IShellLocks shellLocks, Lifetime? parent = null)
3030
{
3131
using var blockingCollection = new BlockingCollection<String>(2);
3232
shellLocks.AssertNonMainThread();
@@ -41,7 +41,9 @@ 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("dotnet", $"{exePath} {port}");
44+
var startInfo = new ProcessStartInfo("dotnet", $"\"{exePath}\" {port}");
45+
46+
startInfo.WorkingDirectory = workingDir;
4547
Protocol = new Protocol(name, serializers, identities, scheduler, wire, Lifetime);
4648
scheduler.Queue(() =>
4749
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void Generate(IBackgroundProgressIndicator progressIndicator, IProject p
119119
_logger.Catch(() =>
120120
{
121121
var port = NetworkUtil.GetFreePort();
122-
var proc = new ProcessWithRdServer(VSharpMain.VSharpProcessName, port, vsharpRunner.FullPath,
122+
var proc = new ProcessWithRdServer(VSharpMain.VSharpProcessName, project.ProjectFileLocation.Parent.FullPath, port, vsharpRunner.FullPath,
123123
project.Locks,
124124
_lifetime);
125125
var projectCsprojPath = project.ProjectFileLocation.FullPath;

0 commit comments

Comments
 (0)