2
0
mirror of synced 2025-01-12 17:44:08 +00:00
2024-03-20 14:45:09 +01:00

40 lines
798 B
C#

using ContinuousTests;
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Codex Continuous-Test-Runner.");
var runner = new ContinuousTestRunner(args, Cancellation.Cts.Token);
Console.CancelKeyPress += (sender, e) =>
{
Console.WriteLine("Stopping...");
e.Cancel = true;
Cancellation.Cts.Cancel();
};
try
{
runner.Run();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
Console.WriteLine("Done.");
}
}
public static class Cancellation
{
static Cancellation()
{
Cts = new CancellationTokenSource();
}
public static CancellationTokenSource Cts { get; }
}