mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
Respect debug working directory during test
This commit is contained in:
parent
f1105a8ce1
commit
0592701576
2 changed files with 12 additions and 4 deletions
|
@ -8880,7 +8880,13 @@ namespace IDE
|
||||||
{
|
{
|
||||||
targetType = .BeefTest;
|
targetType = .BeefTest;
|
||||||
if (mTestManager != null)
|
if (mTestManager != null)
|
||||||
mTestManager.AddProject(project);
|
{
|
||||||
|
String workingDirRel = scope String();
|
||||||
|
ResolveConfigString(mPlatformName, workspaceOptions, project, options, "$(WorkingDir)", "debug working directory", workingDirRel);
|
||||||
|
var workingDir = scope String();
|
||||||
|
Path.GetAbsolutePath(workingDirRel, project.mProjectDir, workingDir);
|
||||||
|
mTestManager.AddProject(project, workingDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace IDE
|
||||||
public int32 mExecutedCount;
|
public int32 mExecutedCount;
|
||||||
public int32 mSkipCount;
|
public int32 mSkipCount;
|
||||||
public int32 mFailedCount;
|
public int32 mFailedCount;
|
||||||
|
public String mWorkingDir ~ delete _;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestEntry
|
public class TestEntry
|
||||||
|
@ -78,10 +79,11 @@ namespace IDE
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddProject(Project project)
|
public void AddProject(Project project, StringView workingDir)
|
||||||
{
|
{
|
||||||
var projectInfo = new ProjectInfo();
|
var projectInfo = new ProjectInfo();
|
||||||
projectInfo.mProject = project;
|
projectInfo.mProject = project;
|
||||||
|
projectInfo.mWorkingDir = new String(workingDir);
|
||||||
mProjectInfos.Add(projectInfo);
|
mProjectInfos.Add(projectInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +143,7 @@ namespace IDE
|
||||||
startInfo.CreateNoWindow = !gApp.mTestEnableConsole;
|
startInfo.CreateNoWindow = !gApp.mTestEnableConsole;
|
||||||
startInfo.SetFileName(curProjectInfo.mTestExePath);
|
startInfo.SetFileName(curProjectInfo.mTestExePath);
|
||||||
startInfo.SetArguments(testInstance.mArgs);
|
startInfo.SetArguments(testInstance.mArgs);
|
||||||
startInfo.SetWorkingDirectory(testInstance.mWorkingDir);
|
startInfo.SetWorkingDirectory(curProjectInfo.mWorkingDir);
|
||||||
mTestInstance.mProcess = new SpawnedProcess();
|
mTestInstance.mProcess = new SpawnedProcess();
|
||||||
if (testInstance.mProcess.Start(startInfo) case .Err)
|
if (testInstance.mProcess.Start(startInfo) case .Err)
|
||||||
{
|
{
|
||||||
|
@ -591,7 +593,7 @@ namespace IDE
|
||||||
|
|
||||||
//mTestInstance.mWorkingDir = new String();
|
//mTestInstance.mWorkingDir = new String();
|
||||||
//Path.GetDirectoryName(curProjectInfo.mTestExePath, mTestInstance.mWorkingDir);
|
//Path.GetDirectoryName(curProjectInfo.mTestExePath, mTestInstance.mWorkingDir);
|
||||||
mTestInstance.mWorkingDir = new String(gApp.mInstallDir);
|
mTestInstance.mWorkingDir = new String(curProjectInfo.mWorkingDir);
|
||||||
|
|
||||||
mTestInstance.mPipeServer = new NamedPipe();
|
mTestInstance.mPipeServer = new NamedPipe();
|
||||||
if (mTestInstance.mPipeServer.Create(".", mTestInstance.mPipeName, .AllowTimeouts) case .Err)
|
if (mTestInstance.mPipeServer.Create(".", mTestInstance.mPipeName, .AllowTimeouts) case .Err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue