mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 09:21:57 +00:00
better mono process detection
This commit is contained in:
parent
58e668a093
commit
aee7019ed2
2 changed files with 15 additions and 7 deletions
|
@ -34,7 +34,7 @@ public class ProcessProvider : IProcessProvider
|
||||||
private static List<Process> GetProcessesByName(string name)
|
private static List<Process> GetProcessesByName(string name)
|
||||||
{
|
{
|
||||||
var monoProcesses = Process.GetProcessesByName("mono")
|
var monoProcesses = Process.GetProcessesByName("mono")
|
||||||
.Where(process => process.Modules.Cast<ProcessModule>().Any(module => module.ModuleName.ToLower() == name + ".exe"));
|
.Where(process => process.Modules.Cast<ProcessModule>().Any(module => module.ModuleName.ToLower() == name.ToLower() + ".exe"));
|
||||||
return Process.GetProcessesByName(name)
|
return Process.GetProcessesByName(name)
|
||||||
.Union(monoProcesses).ToList();
|
.Union(monoProcesses).ToList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using NLog;
|
||||||
using System.ComponentModel;
|
using NLog.Config;
|
||||||
using System.Diagnostics;
|
using NLog.Targets;
|
||||||
using System.IO;
|
|
||||||
using System.Threading;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Api.Commands;
|
using NzbDrone.Api.Commands;
|
||||||
using NzbDrone.Api.RootFolders;
|
using NzbDrone.Api.RootFolders;
|
||||||
|
@ -27,10 +25,20 @@ public abstract class IntegrationTest
|
||||||
|
|
||||||
private NzbDroneRunner _runner;
|
private NzbDroneRunner _runner;
|
||||||
|
|
||||||
|
|
||||||
|
public IntegrationTest()
|
||||||
|
{
|
||||||
|
new StartupArguments();
|
||||||
|
|
||||||
|
LogManager.Configuration = new LoggingConfiguration();
|
||||||
|
var consoleTarget = new ConsoleTarget { Layout = "${level}: ${message} ${exception}" };
|
||||||
|
LogManager.Configuration.AddTarget(consoleTarget.GetType().Name, consoleTarget);
|
||||||
|
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, consoleTarget));
|
||||||
|
}
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void SmokeTestSetup()
|
public void SmokeTestSetup()
|
||||||
{
|
{
|
||||||
new StartupArguments();
|
|
||||||
|
|
||||||
_runner = new NzbDroneRunner();
|
_runner = new NzbDroneRunner();
|
||||||
_runner.KillAll();
|
_runner.KillAll();
|
||||||
|
|
Loading…
Reference in a new issue