diff --git a/tasks/container/cockpit-tasks b/tasks/container/cockpit-tasks index 4ff80fe9..af3c22db 100755 --- a/tasks/container/cockpit-tasks +++ b/tasks/container/cockpit-tasks @@ -19,10 +19,10 @@ function update_bots() { fi } -# wait between 1 and 10 minutes, but not in an interactive terminal (annoying for debugging) +# wait between 1 and 10 minutes, with an override to speed up tests function slumber() { - if [ -t 0 ]; then - sleep 10 + if [ -n "${SLUMBER:-}" ]; then + sleep "$SLUMBER" else sleep $(shuf -i ${1:-60-600} -n 1) fi diff --git a/tasks/run-local.sh b/tasks/run-local.sh index 7b3c7bb2..9d380610 100755 --- a/tasks/run-local.sh +++ b/tasks/run-local.sh @@ -435,7 +435,7 @@ test_pr() { # run the main loop in the background; we could do this with a single run-queue invocation, # but we want to test the cockpit-tasks script - podman exec -i cockpituous-tasks cockpit-tasks & + podman exec -i --env=SLUMBER=5 cockpituous-tasks cockpit-tasks & TASKS_PID=$! podman exec -i cockpituous-tasks sh -euxc "