Skip to content
Merged
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
32 changes: 11 additions & 21 deletions tests/runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,13 @@ check() {
fi
}

# Wait for VERSION file to appear (indicates RoonServer install complete).
# Wait for RoonServer install to complete.
# Returns non-zero on timeout so set -e halts the run — a download that
# never completes is a test failure, not something to silently continue past.
wait_for_install() {
local dir="$1"
local timeout="${2:-180}"
local elapsed=0
echo " Waiting for RoonServer download..."
while [ ! -f "$dir/app/RoonServer/VERSION" ]; do
if [ "$elapsed" -ge "$timeout" ]; then
echo " wait_for_install: timed out after ${timeout}s waiting for $dir/app/RoonServer/VERSION" >&2
return 1
fi
sleep 5
elapsed=$((elapsed + 5))
echo " ... ${elapsed}s"
done
local timeout="${1:-180}"
echo " Waiting for RoonServer install to complete..."
wait_for_log "$CONTAINER" "RoonServer installed successfully" "$timeout"
}
Comment thread
decriptor marked this conversation as resolved.

# Wait for a specific branch to appear in the VERSION file's last line.
Expand Down Expand Up @@ -195,7 +185,7 @@ echo " Temp dir: $ROON_DIR"

start_container "$CONTAINER" "$ROON_DIR"

wait_for_install "$ROON_DIR"
wait_for_install

check "VERSION file created" \
test -f "$ROON_DIR/app/RoonServer/VERSION"
Expand Down Expand Up @@ -261,7 +251,7 @@ echo " Temp dir: $ROON_DIR"

start_container "$CONTAINER" "$ROON_DIR" -e ROON_INSTALL_BRANCH=earlyaccess

wait_for_install "$ROON_DIR"
wait_for_install

check "fresh EA: VERSION file created" \
test -f "$ROON_DIR/app/RoonServer/VERSION"
Expand Down Expand Up @@ -292,7 +282,7 @@ echo " Temp dir: $ROON_DIR"

# First: install production (no env var → default)
start_container "$CONTAINER" "$ROON_DIR"
wait_for_install "$ROON_DIR"
wait_for_install
docker stop -t 10 "$CONTAINER" 2>/dev/null || true
docker rm -f "$CONTAINER" 2>/dev/null || true

Expand Down Expand Up @@ -344,7 +334,7 @@ echo " Temp dir: $ROON_DIR"

# First: install earlyaccess
start_container "$CONTAINER" "$ROON_DIR" -e ROON_INSTALL_BRANCH=earlyaccess
wait_for_install "$ROON_DIR"
wait_for_install
docker stop -t 10 "$CONTAINER" 2>/dev/null || true
docker rm -f "$CONTAINER" 2>/dev/null || true

Expand Down Expand Up @@ -380,7 +370,7 @@ echo " Temp dir: $ROON_DIR"

# Install production first
start_container "$CONTAINER" "$ROON_DIR"
wait_for_install "$ROON_DIR"
wait_for_install
docker stop -t 10 "$CONTAINER" 2>/dev/null || true
docker rm -f "$CONTAINER" 2>/dev/null || true

Expand Down Expand Up @@ -438,7 +428,7 @@ echo " Temp dir: $ROON_DIR"

# Install EA first
start_container "$CONTAINER" "$ROON_DIR" -e ROON_INSTALL_BRANCH=earlyaccess
wait_for_install "$ROON_DIR"
wait_for_install
docker stop -t 10 "$CONTAINER" 2>/dev/null || true
docker rm -f "$CONTAINER" 2>/dev/null || true

Expand Down Expand Up @@ -482,7 +472,7 @@ PROD_URL="https://download.roonlabs.net/builds/production/RoonServer_linuxx64.ta
start_container "$CONTAINER" "$ROON_DIR" \
-e ROON_INSTALL_BRANCH=earlyaccess \
-e ROON_DOWNLOAD_URL="$PROD_URL"
wait_for_install "$ROON_DIR"
wait_for_install
wait_for_log "$CONTAINER" "^Branch: production"
docker logs "$CONTAINER" > "$ROON_DIR/url-override-fresh.log" 2>&1 || true

Expand Down
Loading