2023-06-21 06:28:40 +00:00
|
|
|
|
using ContinuousTests;
|
|
|
|
|
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
2023-10-26 12:26:45 +00:00
|
|
|
|
Console.WriteLine("Codex Continuous-Test-Runner.");
|
2023-06-28 14:19:37 +00:00
|
|
|
|
|
2023-06-30 07:09:59 +00:00
|
|
|
|
var runner = new ContinuousTestRunner(args, Cancellation.Cts.Token);
|
2023-06-28 14:19:37 +00:00
|
|
|
|
|
|
|
|
|
Console.CancelKeyPress += (sender, e) =>
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Stopping...");
|
|
|
|
|
e.Cancel = true;
|
|
|
|
|
|
2023-06-30 07:09:59 +00:00
|
|
|
|
Cancellation.Cts.Cancel();
|
2023-06-28 14:19:37 +00:00
|
|
|
|
};
|
2023-11-14 12:28:50 +00:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
runner.Run();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex.ToString());
|
|
|
|
|
}
|
2023-06-28 14:19:37 +00:00
|
|
|
|
Console.WriteLine("Done.");
|
2023-06-21 06:28:40 +00:00
|
|
|
|
}
|
2023-09-21 08:33:09 +00:00
|
|
|
|
}
|
2023-06-30 07:09:59 +00:00
|
|
|
|
|
2023-09-21 08:33:09 +00:00
|
|
|
|
public static class Cancellation
|
|
|
|
|
{
|
|
|
|
|
static Cancellation()
|
2023-06-30 07:09:59 +00:00
|
|
|
|
{
|
2023-09-21 08:33:09 +00:00
|
|
|
|
Cts = new CancellationTokenSource();
|
2023-06-30 07:09:59 +00:00
|
|
|
|
}
|
2023-09-21 08:33:09 +00:00
|
|
|
|
|
|
|
|
|
public static CancellationTokenSource Cts { get; }
|
2023-06-21 06:28:40 +00:00
|
|
|
|
}
|