Compare commits
2 commits
main
...
old_speedt
Author | SHA1 | Date | |
---|---|---|---|
![]() |
05ce0e2ee6 | ||
![]() |
f2df8f3efa |
1 changed files with 13 additions and 3 deletions
16
runtest.sh
16
runtest.sh
|
@ -174,7 +174,7 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
|||
if [ "$LISTENER_ENABLED" -eq 1 ]; then
|
||||
LISTENER_SAMPLE_FILE="${TEST_FILE%.csv}-listener-$COUNTER-$i.csv"
|
||||
|
||||
log "Launching listener for sample $i/$NUM_TESTS..."
|
||||
log "Launching listener for sample $i/$NUM_SAMPLES..."
|
||||
|
||||
READY_FILE="/tmp/listener_ready_${COUNTER}_${i}"
|
||||
|
||||
|
@ -195,8 +195,18 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
|||
"${ADAPTIVE_ARGS[@]}" > >(tee "$READY_FILE") &
|
||||
LISTENER_PID=$!
|
||||
|
||||
# Wait for the READY_FILE to contain "LISTENING_STARTED"
|
||||
bash -c "until grep -q LISTENING_STARTED $READY_FILE; do sleep 0.2; done"
|
||||
# Wait up to 10 seconds for LISTENING_STARTED
|
||||
log "Waiting for listener to initialize (timeout in 10s)..."
|
||||
for ((j = 0; j < 50; j++)); do
|
||||
if grep -q LISTENING_STARTED "$READY_FILE"; then
|
||||
break
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
if ! grep -q LISTENING_STARTED "$READY_FILE"; then
|
||||
warn "Listener did not start properly (LISTENING_STARTED not found in time). Proceeding without it."
|
||||
fi
|
||||
|
||||
fi
|
||||
log " Sample $i of $NUM_SAMPLES"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue