Skip to content

Commit 4e3aefe

Browse files
author
JoshuaMiller
committed
nunit path fix
1 parent 9ece9d8 commit 4e3aefe

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Jenkins.NET.Publishing/Build_Windows.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Photon.Framework.Agent;
2+
using Photon.Framework.Process;
23
using Photon.Framework.Tasks;
34
using Photon.MSBuild;
45
using System.Threading;
@@ -39,9 +40,14 @@ private async Task BuildSolution(CancellationToken token)
3940

4041
private async Task UnitTest(CancellationToken token)
4142
{
42-
var nunit_exe = Context.AgentVariables["global"]["nunit_exe"];
43+
var info = new ProcessRunInfo {
44+
Filename = Context.AgentVariables["global"]["nunit_exe"],
45+
Arguments = "\"Jenkins.NET.Tests\\bin\\Release\\Jenkins.NET.Tests.dll\" --where=\"cat == 'unit'\"",
46+
WorkingDirectory = Context.ContentDirectory,
47+
};
4348

44-
await Context.Process.RunAsync($"\"{nunit_exe}\" \"Jenkins.NET.Tests\\bin\\Release\\Jenkins.NET.Tests.dll\" --where=\"cat == 'unit'\"", token);
49+
var runner = new ProcessRunner(Context);
50+
await runner.RunAsync(info, token);
4551
}
4652
}
4753
}

0 commit comments

Comments
 (0)