Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasks: Speed up test_pr() #605

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tasks/container/cockpit-tasks
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasks/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=1 cockpituous-tasks cockpit-tasks &
TASKS_PID=$!

podman exec -i cockpituous-tasks sh -euxc "
Expand Down