From 70c87137a92f810b2193972202b53fb8bfa96093 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 2 Oct 2020 11:38:49 +0300 Subject: [PATCH] live_test.v: wait 5 times more on macos --- vlib/v/tests/live_test.v | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/vlib/v/tests/live_test.v b/vlib/v/tests/live_test.v index 7e096e96ad..36b18995f9 100644 --- a/vlib/v/tests/live_test.v +++ b/vlib/v/tests/live_test.v @@ -72,7 +72,13 @@ fn pmessage() string { const ( delay = 5 ) - +fn edefault(name string, default string) string { + res := os.getenv(name) + if res == '' { + return default + } + return res +} fn main() { mut info := live.info() info.recheck_period_ms = 5 @@ -80,8 +86,9 @@ fn main() { myprintln('DATE: ' + time.now().str()) pmessage() pmessage() + max_cycles := edefault('LIVE_CYCLES', '1').int() // NB: 1000 * 5 = maximum of ~5s runtime - for i:=0; i<1000; i++ { + for i:=0; i