Add listener sample data to test file output

This commit is contained in:
Yaro Kasear 2025-05-02 15:29:24 -05:00
parent da5a854ccb
commit 656f067fa5

View file

@ -240,18 +240,12 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
sudo kill -SIGINT "$LISTENER_PID"
wait "$LISTENER_PID"
fi
if [ -f "$LISTENER_SAMPLE_FILE" ]; then
log "Appending listener sample to main CSV..."
tail -n 1 "$LISTENER_SAMPLE_FILE" >> "$TEST_FILE"
rm -f "$LISTENER_SAMPLE_FILE"
else
warn "Listener output not found for sample $COUNTER/$i"
fi
fi
END_TIME=$(date -Iseconds)
echo "$START_TIME,$END_TIME,$link_level_noise,$bssid_and_bitrate,$speed_results,$FAILED_DELTA,$channel,$freq,$packet_loss,$jitter,$LocalTCPUp,$LocalTCPDown,$LocalUDPUp,$LocalUDPDown,$RemoteTCPUp,$RemoteTCPDown,$RemoteUDPUp,$RemoteUDPDown" >>"$TEST_FILE"
LISTENER_ROW=$(tail -n 1 "$LISTENER_SAMPLE_FILE")
echo "$START_TIME,$END_TIME,$link_level_noise,$bssid_and_bitrate,$speed_results,$FAILED_DELTA,$channel,$freq,$packet_loss,$jitter,$LocalTCPUp,$LocalTCPDown,$LocalUDPUp,$LocalUDPDown,$RemoteTCPUp,$RemoteTCPDown,$RemoteUDPUp,$RemoteUDPDown,$LISTENER_ROW" >> "$TEST_FILE"
done
[[ "$COUNTER" -lt "$NUM_TESTS" ]] && log "Waiting $TIME_BETWEEN before next test..." && sleep "$TIME_BETWEEN"