From 656f067fa53dbfff86af31cb379c6226da8041a4 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 2 May 2025 15:29:24 -0500 Subject: [PATCH] Add listener sample data to test file output --- runtest.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/runtest.sh b/runtest.sh index ce5614c..e0a137b 100755 --- a/runtest.sh +++ b/runtest.sh @@ -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"