Refactor CSV handling in csv_handler.py and update runtest.sh to log SSID metrics file path
This commit is contained in:
parent
68ed848b54
commit
69c46aff22
3 changed files with 9 additions and 6 deletions
|
@ -27,7 +27,7 @@ def write_ssid_sidecar(enriched_path, ssid_summary):
|
||||||
write a sidecar CSV file next to it.
|
write a sidecar CSV file next to it.
|
||||||
"""
|
"""
|
||||||
enriched = Path(enriched_path)
|
enriched = Path(enriched_path)
|
||||||
ssid_outfile = enriched.with_name(enriched.stem + '-ssid-metrics.csv')
|
ssid_outfile = Path(enriched_path).with_name(Path(enriched_path).stem + '-ssid-metrics.csv')
|
||||||
|
|
||||||
with ssid_outfile.open('w', newline='', encoding='utf-8') as f:
|
with ssid_outfile.open('w', newline='', encoding='utf-8') as f:
|
||||||
fieldnames = [
|
fieldnames = [
|
||||||
|
|
|
@ -9,6 +9,10 @@ source settings.env
|
||||||
|
|
||||||
EMAIL_BODY=${EMAIL_BODY:-"Test $BOOT_ID completed successfully. Please find the attached files and collect the probe."}
|
EMAIL_BODY=${EMAIL_BODY:-"Test $BOOT_ID completed successfully. Please find the attached files and collect the probe."}
|
||||||
|
|
||||||
|
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
|
||||||
|
TEST_FILE="${HOME}/${BOOT_ID}-speedtest.csv"
|
||||||
|
ENRICHED_FILE="${TEST_FILE%.csv}+rf.csv"
|
||||||
|
SSID_METRICS_FILE="${ENRICHED_FILE%.csv}-ssid-metrics.csv"
|
||||||
FAILURE_LOG="${TEST_FILE%.csv}-failures.log"
|
FAILURE_LOG="${TEST_FILE%.csv}-failures.log"
|
||||||
SCRIPT_START=$(date +%s)
|
SCRIPT_START=$(date +%s)
|
||||||
|
|
||||||
|
@ -27,6 +31,10 @@ die() {
|
||||||
|
|
||||||
[ -z "$RECIPIENT" ] && die "Please set the RECIPIENT variable in settings.env."
|
[ -z "$RECIPIENT" ] && die "Please set the RECIPIENT variable in settings.env."
|
||||||
|
|
||||||
|
log "Test file: $TEST_FILE"
|
||||||
|
log "Enriched file: $ENRICHED_FILE"
|
||||||
|
log "SSID metrics file: $SSID_METRICS_FILE"
|
||||||
|
|
||||||
sudo -v
|
sudo -v
|
||||||
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
||||||
SUDO_KEEPALIVE_PID=$!
|
SUDO_KEEPALIVE_PID=$!
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
BOOT_ID=$(cat /proc/sys/kernel/random/boot_id)
|
|
||||||
|
|
||||||
SCRIPT_DIRECTORY="${HOME}/wifi_test"
|
SCRIPT_DIRECTORY="${HOME}/wifi_test"
|
||||||
KISMET_LOG_DIR="${HOME}/kismet_logs"
|
KISMET_LOG_DIR="${HOME}/kismet_logs"
|
||||||
TEST_FILE="${HOME}/${BOOT_ID}-speedtest.csv"
|
|
||||||
ENRICHED_FILE="${TEST_FILE%}+rf.csv"
|
|
||||||
SSID_METRICS_FILE="${ENRICHED_FILE%.csv}-ssid-metrics.csv"
|
|
||||||
|
|
||||||
NUM_TESTS=1
|
NUM_TESTS=1
|
||||||
NUM_SAMPLES=5
|
NUM_SAMPLES=5
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue