cs-codex-dist-tests/ContinuousTests/Program.cs

34 lines
748 B
C#
Raw Normal View History

using ContinuousTests;
public class Program
{
public static void Main(string[] args)
{
2023-06-25 07:53:10 +00:00
Console.WriteLine("Codex Continous-Test-Runner.");
Console.WriteLine("Running...");
2023-06-28 14:19:37 +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;
Cancellation.Cts.Cancel();
2023-06-28 14:19:37 +00:00
};
runner.Run();
2023-06-28 14:19:37 +00:00
Console.WriteLine("Done.");
}
public static class Cancellation
{
static Cancellation()
{
Cts = new CancellationTokenSource();
}
public static CancellationTokenSource Cts { get; }
}
}