private void InternalMain(bool RunTestsViewOut, String[] Arguments)
{
var BasePath = Path.GetDirectoryName(Application.ExecutablePath);
string PspAutoTestsFolder = "";
foreach (var TryName in new[] { "pspautotests/tests", "../../../pspautotests/tests" })
{
if (Directory.Exists(BasePath + "/" + TryName))
{
PspAutoTestsFolder = new DirectoryInfo(BasePath + "/" + TryName).FullName;
break;
}
}
if (string.IsNullOrEmpty(PspAutoTestsFolder))
{
Console.Error.WriteLine("Can't find 'pspautotests/tests' folder.");
Console.ReadKey();
}
Console.WriteLine(PspAutoTestsFolder);
var WildCardFilter = "*";
if (Arguments.Length > 0)
{
WildCardFilter = Arguments[0];
}
//Console.WriteLine(String.Join(" ", Arguments));
if (Debugger.IsAttached)
{
try
{
Console.SetWindowSize(160, 60);
Console.SetBufferSize(160, 2000);
}
catch
{
}
}
if (WildCardFilter.Length > 0)
{
WildCardFilter = "*" + WildCardFilter + "*";
}
Init();
Run(RunTestsViewOut, PspAutoTestsFolder, WildCardFilter);
if (Debugger.IsAttached)
{
Console.WriteLine("Done");
Console.ReadKey();
}
}