From 27040b66ee0941bb87605cb39dcdf8819c8cfade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Thu, 3 Oct 2024 18:52:17 +0200 Subject: [PATCH] play more short games for regression test --- xtask/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index cf02853..88517d1 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -159,13 +159,13 @@ fn regression() -> Result<(), DynError> { let (won, games) = res?; println!( "\nThe local snake has won {won}/{games} games ({}%)", - won * 100 / games + (won + games / 200) * 100 / games ); Ok(()) } fn try_regression() -> Result<(usize, usize), DynError> { - const GAMES: usize = 100; + const GAMES: usize = 1000; // limit the parallelism rayon::ThreadPoolBuilder::new() .num_threads(std::thread::available_parallelism()?.get() / 3) @@ -184,6 +184,8 @@ fn try_regression() -> Result<(usize, usize), DynError> { "11", "-H", "11", + "--timeout", + "50", "--name", "local", "--url", @@ -246,6 +248,10 @@ fn run_production(port: u16) -> Result { let mut snake = Command::new("docker") .args([ "run", + "--name", + "battlesnake-regression", + "--init", + "--replace", "--env", "RUST_LOG=error", "--env",